JsonReaderWriterFactory.CreateJsonReader JsonReaderWriterFactory.CreateJsonReader JsonReaderWriterFactory.CreateJsonReader JsonReaderWriterFactory.CreateJsonReader Method

Definition

Creates an XmlDictionaryReader that can map - streams or buffers encoded with JavaScript Object Notation (JSON) to an XML Infoset.

Overloads

CreateJsonReader(Byte[], XmlDictionaryReaderQuotas) CreateJsonReader(Byte[], XmlDictionaryReaderQuotas) CreateJsonReader(Byte[], XmlDictionaryReaderQuotas) CreateJsonReader(Byte[], XmlDictionaryReaderQuotas)

Creates an XmlDictionaryReader that can map buffers encoded with JavaScript Object Notation (JSON) to an XML Infoset.

CreateJsonReader(Stream, XmlDictionaryReaderQuotas) CreateJsonReader(Stream, XmlDictionaryReaderQuotas) CreateJsonReader(Stream, XmlDictionaryReaderQuotas)

Creates an XmlDictionaryReader that can map streams encoded with JavaScript Object Notation (JSON) to an XML Infoset.

CreateJsonReader(Byte[], Int32, Int32, XmlDictionaryReaderQuotas) CreateJsonReader(Byte[], Int32, Int32, XmlDictionaryReaderQuotas) CreateJsonReader(Byte[], Int32, Int32, XmlDictionaryReaderQuotas) CreateJsonReader(Byte[], Int32, Int32, XmlDictionaryReaderQuotas)

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

CreateJsonReader(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) CreateJsonReader(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) CreateJsonReader(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose)

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

CreateJsonReader(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) CreateJsonReader(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) CreateJsonReader(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.

Remarks

Each of the overloads uses a XmlDictionaryReaderQuotas to prevent Denial of Service (DoS) attacks when reading untrusted data. For more information about using XmlDictionaryReaderQuotas to prevent Denial of Service attacks when reading untrusted data, see Security Considerations for Data.

CreateJsonReader(Byte[], XmlDictionaryReaderQuotas) CreateJsonReader(Byte[], XmlDictionaryReaderQuotas) CreateJsonReader(Byte[], XmlDictionaryReaderQuotas) CreateJsonReader(Byte[], XmlDictionaryReaderQuotas)

Creates an XmlDictionaryReader that can map buffers encoded with JavaScript Object Notation (JSON) to an XML Infoset.

public:
 static System::Xml::XmlDictionaryReader ^ CreateJsonReader(cli::array <System::Byte> ^ buffer, System::Xml::XmlDictionaryReaderQuotas ^ quotas);
public static System.Xml.XmlDictionaryReader CreateJsonReader (byte[] buffer, System.Xml.XmlDictionaryReaderQuotas quotas);
static member CreateJsonReader : byte[] * System.Xml.XmlDictionaryReaderQuotas -> System.Xml.XmlDictionaryReader
Public Shared Function CreateJsonReader (buffer As Byte(), quotas As XmlDictionaryReaderQuotas) As XmlDictionaryReader

Parameters

buffer
Byte[]

The input Byte buffer array from which to read.

quotas
XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas

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

Returns

An XmlDictionaryReader that can process JavaScript Object Notation (JSON) data.

Remarks

This overload does not accept an Encoding parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read.

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

CreateJsonReader(Stream, XmlDictionaryReaderQuotas) CreateJsonReader(Stream, XmlDictionaryReaderQuotas) CreateJsonReader(Stream, XmlDictionaryReaderQuotas)

Creates an XmlDictionaryReader that can map streams encoded with JavaScript Object Notation (JSON) to an XML Infoset.

public:
 static System::Xml::XmlDictionaryReader ^ CreateJsonReader(System::IO::Stream ^ stream, System::Xml::XmlDictionaryReaderQuotas ^ quotas);
public static System.Xml.XmlDictionaryReader CreateJsonReader (System.IO.Stream stream, System.Xml.XmlDictionaryReaderQuotas quotas);
static member CreateJsonReader : System.IO.Stream * System.Xml.XmlDictionaryReaderQuotas -> System.Xml.XmlDictionaryReader

Parameters

stream
Stream Stream Stream Stream

The input Stream from which to read.

quotas
XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas

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

Returns

Remarks

This overload does not take an Encoding parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read.

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

CreateJsonReader(Byte[], Int32, Int32, XmlDictionaryReaderQuotas) CreateJsonReader(Byte[], Int32, Int32, XmlDictionaryReaderQuotas) CreateJsonReader(Byte[], Int32, Int32, XmlDictionaryReaderQuotas) CreateJsonReader(Byte[], Int32, Int32, XmlDictionaryReaderQuotas)

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

public:
 static System::Xml::XmlDictionaryReader ^ CreateJsonReader(cli::array <System::Byte> ^ buffer, int offset, int count, System::Xml::XmlDictionaryReaderQuotas ^ quotas);
public static System.Xml.XmlDictionaryReader CreateJsonReader (byte[] buffer, int offset, int count, System.Xml.XmlDictionaryReaderQuotas quotas);
static member CreateJsonReader : byte[] * int * int * System.Xml.XmlDictionaryReaderQuotas -> System.Xml.XmlDictionaryReader
Public Shared Function CreateJsonReader (buffer As Byte(), offset As Integer, count As Integer, quotas As XmlDictionaryReaderQuotas) As XmlDictionaryReader

Parameters

buffer
Byte[]

The input Byte buffer array from which to read.

offset
Int32 Int32 Int32 Int32

Starting position from which to read in buffer.

count
Int32 Int32 Int32 Int32

Number of bytes that can be read from buffer.

quotas
XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas

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

Returns

Remarks

This overload does not take an Encoding parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read.

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

CreateJsonReader(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) CreateJsonReader(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) CreateJsonReader(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose)

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

public:
 static System::Xml::XmlDictionaryReader ^ CreateJsonReader(System::IO::Stream ^ stream, System::Text::Encoding ^ encoding, System::Xml::XmlDictionaryReaderQuotas ^ quotas, System::Xml::OnXmlDictionaryReaderClose ^ onClose);
public static System.Xml.XmlDictionaryReader CreateJsonReader (System.IO.Stream stream, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose onClose);
static member CreateJsonReader : System.IO.Stream * System.Text.Encoding * System.Xml.XmlDictionaryReaderQuotas * System.Xml.OnXmlDictionaryReaderClose -> System.Xml.XmlDictionaryReader

Parameters

stream
Stream Stream Stream Stream

The input Stream from which to read.

encoding
Encoding Encoding Encoding 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.

quotas
XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas

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

Returns

Remarks

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

CreateJsonReader(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) CreateJsonReader(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) CreateJsonReader(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.

public:
 static System::Xml::XmlDictionaryReader ^ CreateJsonReader(cli::array <System::Byte> ^ buffer, int offset, int count, System::Text::Encoding ^ encoding, System::Xml::XmlDictionaryReaderQuotas ^ quotas, System::Xml::OnXmlDictionaryReaderClose ^ onClose);
public static System.Xml.XmlDictionaryReader CreateJsonReader (byte[] buffer, int offset, int count, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose onClose);
static member CreateJsonReader : byte[] * int * int * System.Text.Encoding * System.Xml.XmlDictionaryReaderQuotas * System.Xml.OnXmlDictionaryReaderClose -> System.Xml.XmlDictionaryReader

Parameters

buffer
Byte[]

The input Byte buffer array from which to read.

offset
Int32 Int32 Int32 Int32

Starting position from which to read in buffer.

count
Int32 Int32 Int32 Int32

Number of bytes that can be read from buffer.

encoding
Encoding Encoding Encoding 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.

quotas
XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas

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

onClose
OnXmlDictionaryReaderClose OnXmlDictionaryReaderClose OnXmlDictionaryReaderClose OnXmlDictionaryReaderClose

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

Returns

Remarks

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

Applies to