JsonReaderWriterFactory.CreateJsonReader Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an XmlDictionaryReader that can map - streams or buffers encoded with JavaScript Object Notation (JSON) to an XML Infoset.
Overloads
CreateJsonReader(Byte[], XmlDictionaryReaderQuotas) |
Creates an XmlDictionaryReader that can map buffers encoded with JavaScript Object Notation (JSON) to an XML Infoset. |
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) |
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) |
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) |
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)
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
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
- quotas
- 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.
Applies to
CreateJsonReader(Stream, XmlDictionaryReaderQuotas)
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
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
Public Shared Function CreateJsonReader (stream As Stream, quotas As XmlDictionaryReaderQuotas) As XmlDictionaryReader
Parameters
- quotas
- XmlDictionaryReaderQuotas
The XmlDictionaryReaderQuotas used to prevent Denial of Service attacks when reading untrusted data.
Returns
An XmlDictionaryReader that can read JavaScript Object Notation (JSON).
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.
Applies to
CreateJsonReader(Byte[], Int32, Int32, XmlDictionaryReaderQuotas)
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
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
- offset
- Int32
Starting position from which to read in buffer
.
- count
- Int32
Number of bytes that can be read from buffer
.
- quotas
- XmlDictionaryReaderQuotas
The XmlDictionaryReaderQuotas used to prevent Denial of Service attacks when reading untrusted data.
Returns
An XmlDictionaryReader that can read JavaScript Object Notation (JSON).
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.
Applies to
CreateJsonReader(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose)
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
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);
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
Public Shared Function CreateJsonReader (stream As Stream, encoding As Encoding, quotas As XmlDictionaryReaderQuotas, onClose As OnXmlDictionaryReaderClose) As XmlDictionaryReader
Parameters
- 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
The XmlDictionaryReaderQuotas used to prevent Denial of Service attacks when reading untrusted data.
- onClose
- OnXmlDictionaryReaderClose
The OnXmlDictionaryReaderClose delegate to call when the reader is closed.
Returns
An XmlDictionaryReader that can read JavaScript Object Notation (JSON).
Remarks
For more information about using XmlDictionaryReaderQuotas to prevent Denial of Service attacks when reading untrusted data, see Security Considerations for Data.
Applies to
CreateJsonReader(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose)
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
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);
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
Public Shared Function CreateJsonReader (buffer As Byte(), offset As Integer, count As Integer, encoding As Encoding, quotas As XmlDictionaryReaderQuotas, onClose As OnXmlDictionaryReaderClose) As XmlDictionaryReader
Parameters
- offset
- Int32
Starting position from which to read in buffer
.
- count
- Int32
Number of bytes that can be read from buffer
.
- 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
The XmlDictionaryReaderQuotas used to prevent Denial of Service attacks when reading untrusted data.
- onClose
- OnXmlDictionaryReaderClose
The OnXmlDictionaryReaderClose delegate to call when the reader is closed. The default value is null
.
Returns
An XmlDictionaryReader that can read JavaScript Object Notation (JSON).
Remarks
For more information about using XmlDictionaryReaderQuotas to prevent Denial of Service attacks when reading untrusted data, see Security Considerations for Data.