예제 #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));
        }