JsonReaderWriterFactory.CreateJsonReader 方法

定義

建立 XmlDictionaryReader 一個可以將 JavaScript 物件符號(JSON)編碼的串流或緩衝區映射到 XML 資訊集的

多載

名稱 Description
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)編碼的緩衝區(具有指定大小、偏移量及字元編碼)映射到 XML 資訊集的程式。

備註

每個超載都會使用 A XmlDictionaryReaderQuotas ,以防止讀取不受信任資料時遭受阻斷服務(DoS)攻擊。 欲了解更多關於 XmlDictionaryReaderQuotas 在讀取不受信任資料時防止阻斷服務攻擊的資訊,請參閱 資料安全考量

CreateJsonReader(Byte[], XmlDictionaryReaderQuotas)

來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
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

參數

buffer
Byte[]

輸入 Byte 緩衝區陣列,用來讀取資料。

quotas
XmlDictionaryReaderQuotas

用於 XmlDictionaryReaderQuotas 防止讀取不受信任資料時的阻斷服務攻擊。

傳回

一個 XmlDictionaryReader 能處理 JavaScript 物件符號(JSON)資料的裝置。

備註

此過載不接受參數 Encoding 。 字元編碼(UTF-8、Unicode 或 Big-Endian Unicode)在讀取資料時會自動偵測。

欲了解更多關於 XmlDictionaryReaderQuotas 在讀取不受信任資料時防止阻斷服務攻擊的資訊,請參閱 資料安全考量

適用於

CreateJsonReader(Stream, XmlDictionaryReaderQuotas)

來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
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

參數

stream
Stream

讀取的輸入 Stream

quotas
XmlDictionaryReaderQuotas

用於 XmlDictionaryReaderQuotas 防止讀取不受信任資料時的阻斷服務攻擊。

傳回

一個 XmlDictionaryReader 能讀取 JavaScript 物件符號(JSON)的裝置。

備註

這種過載不需要參數 Encoding 。 字元編碼(UTF-8、Unicode 或 Big-Endian Unicode)在讀取資料時會自動偵測。

欲了解更多關於 XmlDictionaryReaderQuotas 在讀取不受信任資料時防止阻斷服務攻擊的資訊,請參閱 資料安全考量

適用於

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

來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
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

參數

buffer
Byte[]

輸入 Byte 緩衝區陣列,用來讀取資料。

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)

來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
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

參數

stream
Stream

讀取的輸入 Stream

encoding
Encoding

Encoding 個指定了讀者所使用的字元編碼。 若 null 被指定為值,讀取器會嘗試自動偵測該編碼。

quotas
XmlDictionaryReaderQuotas

用於 XmlDictionaryReaderQuotas 防止讀取不受信任資料時的阻斷服務攻擊。

onClose
OnXmlDictionaryReaderClose

OnXmlDictionaryReaderClose當讀者關閉時,代表會打電話。

傳回

一個 XmlDictionaryReader 能讀取 JavaScript 物件符號(JSON)的裝置。

備註

欲了解更多關於 XmlDictionaryReaderQuotas 在讀取不受信任資料時防止阻斷服務攻擊的資訊,請參閱 資料安全考量

適用於

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

來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs
來源:
JsonReaderWriterFactory.cs

建立 XmlDictionaryReader 一個可以將以 JavaScript 物件符號(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

參數

buffer
Byte[]

輸入 Byte 緩衝區陣列,用來讀取資料。

offset
Int32

閱讀的起始位置 buffer

count
Int32

可從 讀取 buffer的位元組數。

encoding
Encoding

Encoding 個指定了讀者所使用的字元編碼。 若 null 被指定為值,讀取器會嘗試自動偵測該編碼。

quotas
XmlDictionaryReaderQuotas

用於 XmlDictionaryReaderQuotas 防止讀取不受信任資料時的阻斷服務攻擊。

onClose
OnXmlDictionaryReaderClose

OnXmlDictionaryReaderClose當讀者關閉時,代表會打電話。 預設值為 null

傳回

一個 XmlDictionaryReader 能讀取 JavaScript 物件符號(JSON)的裝置。

備註

欲了解更多關於 XmlDictionaryReaderQuotas 在讀取不受信任資料時防止阻斷服務攻擊的資訊,請參閱 資料安全考量

適用於