CreateJsonReader Method (Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose)

JsonReaderWriterFactory.CreateJsonReader Method (Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose)


Creates an XmlDictionaryReader that can map buffers encoded with JavaScript Object Notation (JSON), with a specified size and offset and character encoding, to an XML Infoset.

Namespace:   System.Runtime.Serialization.Json
Assembly:  System.Runtime.Serialization (in System.Runtime.Serialization.dll)

public static XmlDictionaryReader CreateJsonReader(
	byte[] buffer,
	int offset,
	int count,
	Encoding encoding,
	XmlDictionaryReaderQuotas quotas,
	OnXmlDictionaryReaderClose onClose


Type: System.Byte[]

The input Byte buffer array from which to read.

Type: System.Int32

Starting position from which to read in buffer.

Type: System.Int32

Number of bytes that can be read from buffer.

Type: System.Text.Encoding

The Encoding that specifies the character encoding used by the reader. If null is specified as the value, the reader attempts to auto-detect the encoding.

Type: System.Xml.XmlDictionaryReaderQuotas

The XmlDictionaryReaderQuotas used to prevent Denial of Service attacks when reading untrusted data.

Type: System.Xml.OnXmlDictionaryReaderClose

The OnXmlDictionaryReaderClose delegate to call when the reader is closed. The default value is null.

Return Value

Type: System.Xml.XmlDictionaryReader

An XmlDictionaryReader that can read JavaScript Object Notation (JSON).

For more information about using XmlDictionaryReaderQuotas to prevent Denial of Service attacks when reading untrusted data, see Security Considerations for Data.

.NET Framework
Available since 3.5
Return to top
© 2015 Microsoft