Example #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));
            }
        }
Example #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));
                }
            }
        }
Example #3
0
        public static object?Deserialize(Type expected, IDeserializationContext context)
        {
            var stream = new StreamReaderWrapper(context.StreamReader);

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