JsonReaderWriterFactory.CreateJsonReader 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建一个 XmlDictionaryReader 可以映射到 XML Infoset 的流式处理或缓冲区(使用 JavaScript 对象表示法(JSON)编码的缓冲区。
重载
| 名称 | 说明 |
|---|---|
| CreateJsonReader(Byte[], XmlDictionaryReaderQuotas) |
创建一个 XmlDictionaryReader 可将使用 JavaScript 对象表示法(JSON)编码的缓冲区映射到 XML 信息集。 |
| CreateJsonReader(Stream, XmlDictionaryReaderQuotas) |
创建一个 XmlDictionaryReader 可将使用 JavaScript 对象表示法(JSON)编码的流映射到 XML 信息集。 |
| CreateJsonReader(Byte[], Int32, Int32, XmlDictionaryReaderQuotas) |
创建一个 XmlDictionaryReader ,它可以将用指定大小和偏移量的 JavaScript 对象表示法(JSON)编码的缓冲区映射到 XML 信息集。 |
| CreateJsonReader(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) |
创建一个 XmlDictionaryReader 可将使用 JavaScript 对象表示法(JSON)编码的流映射到 XML 信息集(大小和偏移量)。 |
| CreateJsonReader(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) |
创建一个 XmlDictionaryReader 可将使用 JavaScript 对象表示法(JSON)编码的缓冲区(JSON)映射到 XML 信息集,该缓冲区的大小和偏移量和字符编码。 |
注解
每次重载读取不受信任的数据时,都会使用 a XmlDictionaryReaderQuotas 来防止拒绝服务(DoS)攻击。 有关在读取不受信任的数据时使用 XmlDictionaryReaderQuotas 防止拒绝服务攻击的详细信息,请参阅 数据的安全注意事项。
CreateJsonReader(Byte[], XmlDictionaryReaderQuotas)
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
创建一个 XmlDictionaryReader 可将使用 JavaScript 对象表示法(JSON)编码的缓冲区映射到 XML 信息集。
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
参数
- quotas
- XmlDictionaryReaderQuotas
XmlDictionaryReaderQuotas用于防止读取不受信任的数据时拒绝服务攻击。
返回
XmlDictionaryReader可以处理 JavaScript 对象表示法(JSON)数据。
注解
此重载不接受参数 Encoding 。 读取数据时,会自动检测字符编码(UTF-8、Unicode 或 Big-Endian Unicode)。
有关在读取不受信任的数据时使用 XmlDictionaryReaderQuotas 防止拒绝服务攻击的详细信息,请参阅 数据的安全注意事项。
适用于
CreateJsonReader(Stream, XmlDictionaryReaderQuotas)
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
创建一个 XmlDictionaryReader 可将使用 JavaScript 对象表示法(JSON)编码的流映射到 XML 信息集。
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
参数
- quotas
- XmlDictionaryReaderQuotas
XmlDictionaryReaderQuotas用于防止读取不受信任的数据时拒绝服务攻击。
返回
一个 XmlDictionaryReader 可以读取 JavaScript 对象表示法(JSON)。
注解
此重载不采用参数 Encoding 。 读取数据时,会自动检测字符编码(UTF-8、Unicode 或 Big-Endian Unicode)。
有关在读取不受信任的数据时使用 XmlDictionaryReaderQuotas 防止拒绝服务攻击的详细信息,请参阅 数据的安全注意事项。
适用于
CreateJsonReader(Byte[], Int32, Int32, XmlDictionaryReaderQuotas)
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
创建一个 XmlDictionaryReader ,它可以将用指定大小和偏移量的 JavaScript 对象表示法(JSON)编码的缓冲区映射到 XML 信息集。
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
参数
- offset
- Int32
要从中读取 buffer的起始位置。
- count
- Int32
可从中读取 buffer的字节数。
- quotas
- XmlDictionaryReaderQuotas
XmlDictionaryReaderQuotas用于防止读取不受信任的数据时拒绝服务攻击。
返回
一个 XmlDictionaryReader 可以读取 JavaScript 对象表示法(JSON)。
注解
此重载不采用参数 Encoding 。 读取数据时,会自动检测字符编码(UTF-8、Unicode 或 Big-Endian Unicode)。
有关在读取不受信任的数据时使用 XmlDictionaryReaderQuotas 防止拒绝服务攻击的详细信息,请参阅 数据的安全注意事项。
适用于
CreateJsonReader(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose)
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
创建一个 XmlDictionaryReader 可将使用 JavaScript 对象表示法(JSON)编码的流映射到 XML 信息集(大小和偏移量)。
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
参数
- quotas
- XmlDictionaryReaderQuotas
XmlDictionaryReaderQuotas用于防止读取不受信任的数据时拒绝服务攻击。
- onClose
- OnXmlDictionaryReaderClose
OnXmlDictionaryReaderClose读取器关闭时要调用的委托。
返回
一个 XmlDictionaryReader 可以读取 JavaScript 对象表示法(JSON)。
注解
有关在读取不受信任的数据时使用 XmlDictionaryReaderQuotas 防止拒绝服务攻击的详细信息,请参阅 数据的安全注意事项。
适用于
CreateJsonReader(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose)
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
- Source:
- JsonReaderWriterFactory.cs
创建一个 XmlDictionaryReader 可将使用 JavaScript 对象表示法(JSON)编码的缓冲区(JSON)映射到 XML 信息集,该缓冲区的大小和偏移量和字符编码。
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
参数
- offset
- Int32
要从中读取 buffer的起始位置。
- count
- Int32
可从中读取 buffer的字节数。
- quotas
- XmlDictionaryReaderQuotas
XmlDictionaryReaderQuotas用于防止读取不受信任的数据时拒绝服务攻击。
- onClose
- OnXmlDictionaryReaderClose
OnXmlDictionaryReaderClose读取器关闭时要调用的委托。 默认值为 null。
返回
一个 XmlDictionaryReader 可以读取 JavaScript 对象表示法(JSON)。
注解
有关在读取不受信任的数据时使用 XmlDictionaryReaderQuotas 防止拒绝服务攻击的详细信息,请参阅 数据的安全注意事项。