Example #1
0
 public override object ReadObject(Stream stream)
 {
     CheckNull(stream, "stream");
     return(ReadObject(JsonReaderWriterFactory.CreateJsonReader(stream, XmlDictionaryReaderQuotas.Max)));
 }
 public override void WriteObject(Stream stream, object graph)
 {
     using (var xw = JsonReaderWriterFactory.CreateJsonWriter(stream))
         WriteObject(xw, graph);
 }
Example #3
0
 public static XmlDictionaryWriter CreateJsonWriter(Stream stream, Encoding encoding)
 {
     return(JsonReaderWriterFactory.CreateJsonWriter(stream, encoding, true));
 }
Example #4
0
 public static XmlDictionaryReader CreateJsonReader(byte[] buffer, int offset, int count, XmlDictionaryReaderQuotas quotas)
 {
     return(JsonReaderWriterFactory.CreateJsonReader(buffer, offset, count, (Encoding)null, quotas, (OnXmlDictionaryReaderClose)null));
 }
Example #5
0
 public static XmlDictionaryReader CreateJsonReader(Stream stream, XmlDictionaryReaderQuotas quotas)
 {
     return(JsonReaderWriterFactory.CreateJsonReader(stream, (Encoding)null, quotas, (OnXmlDictionaryReaderClose)null));
 }
Example #6
0
        public override object?ReadObject(Stream stream)
        {
            ArgumentNullException.ThrowIfNull(stream);

            return(ReadObject(JsonReaderWriterFactory.CreateJsonReader(stream, XmlDictionaryReaderQuotas.Max)));
        }