Utf8JsonWriter 建構函式

定義

多載

Utf8JsonWriter(IBufferWriter<Byte>, JsonWriterOptions)

使用指定的 IBufferWriter<T> 來將輸出寫入和自訂選項,藉以將 Utf8JsonWriter 類別的新執行個體初始化。

Utf8JsonWriter(Stream, JsonWriterOptions)

使用指定的串流來將輸出寫入和自訂選項,藉以將 Utf8JsonWriter 類別的新執行個體初始化。

Utf8JsonWriter(IBufferWriter<Byte>, JsonWriterOptions)

來源:
Utf8JsonWriter.cs
來源:
Utf8JsonWriter.cs
來源:
Utf8JsonWriter.cs

使用指定的 IBufferWriter<T> 來將輸出寫入和自訂選項,藉以將 Utf8JsonWriter 類別的新執行個體初始化。

public Utf8JsonWriter (System.Buffers.IBufferWriter<byte> bufferWriter, System.Text.Json.JsonWriterOptions options = default);
new System.Text.Json.Utf8JsonWriter : System.Buffers.IBufferWriter<byte> * System.Text.Json.JsonWriterOptions -> System.Text.Json.Utf8JsonWriter
Public Sub New (bufferWriter As IBufferWriter(Of Byte), Optional options As JsonWriterOptions = Nothing)

參數

bufferWriter
IBufferWriter<Byte>

寫入 JSON 文字的目的地。

options
JsonWriterOptions

定義 Utf8JsonWriter 的自訂行為。 根據預設,它會寫入最小化的 JSON (不含額外的空白字元),並根據 JSON RFC 驗證所寫入的 JSON 在結構上是有效的。

例外狀況

bufferWriternull

適用於

Utf8JsonWriter(Stream, JsonWriterOptions)

來源:
Utf8JsonWriter.cs
來源:
Utf8JsonWriter.cs
來源:
Utf8JsonWriter.cs

使用指定的串流來將輸出寫入和自訂選項,藉以將 Utf8JsonWriter 類別的新執行個體初始化。

public Utf8JsonWriter (System.IO.Stream utf8Json, System.Text.Json.JsonWriterOptions options = default);
new System.Text.Json.Utf8JsonWriter : System.IO.Stream * System.Text.Json.JsonWriterOptions -> System.Text.Json.Utf8JsonWriter
Public Sub New (utf8Json As Stream, Optional options As JsonWriterOptions = Nothing)

參數

utf8Json
Stream

寫入 JSON 文字的目的地。

options
JsonWriterOptions

定義 Utf8JsonWriter 的自訂行為。 根據預設,它會寫入最小化的 JSON (不含額外的空白字元),並根據 JSON RFC 驗證所寫入的 JSON 在結構上是有效的。

例外狀況

utf8Jsonnull

適用於