コード例 #1
0
        public static object?Deserialize(Type expected, IDeserializationContext context)
        {
            using (Profiler.TraceMethod(nameof(J)))
            {
                var jsonSerializer = GetSerializer(context);

                var stream = new StreamReaderWrapper(context.StreamReader);

                return(jsonSerializer.Deserialize <object>(stream, expected));
            }
        }
コード例 #2
0
        public static object Deserialize(Type expected, IDeserializationContext context)
        {
            using (Profiler.TraceMethod(nameof(J)))
            {
                var jsonSerializer = GetSerializer(context);

                var stream = new StreamReaderWrapper(context.StreamReader);

                using (var reader = new JsonTextReader(new StreamReader(stream)))
                {
                    return(jsonSerializer.Deserialize(reader, expected));
                }
            }
        }
コード例 #3
0
ファイル: J{T}.cs プロジェクト: jrlost/squidex
        public static object?Deserialize(Type expected, IDeserializationContext context)
        {
            var stream = new StreamReaderWrapper(context.StreamReader);

            return(GetSerializer(context).Deserialize <object>(stream, expected));
        }