Utf8JsonWriter 類別

定義

提供高效能 API,以便對 UTF-8 編碼的 JSON 文字進行非快取的順向寫入。Provides a high-performance API for forward-only, non-cached writing of UTF-8 encoded JSON text.

public ref class Utf8JsonWriter sealed : IAsyncDisposable, IDisposable
public sealed class Utf8JsonWriter : IAsyncDisposable, IDisposable
type Utf8JsonWriter = class
    interface IAsyncDisposable
    interface IDisposable
Public NotInheritable Class Utf8JsonWriter
Implements IAsyncDisposable, IDisposable
繼承
Utf8JsonWriter
實作

備註

Utf8JsonWriter依序寫入文字,而不使用快取,而且依預設會遵循JSON RFC,但不包含寫入批註。Utf8JsonWriter writes the text sequentially with no caching and by default adheres to the JSON RFC, with the exception of writing comments.

當啟用InvalidOperationException驗證時,嘗試寫入無效 JSON 的方法會擲回,並出現內容特定的錯誤訊息。A method that attempts to write invalid JSON when validation is enabled throws an InvalidOperationException with a context-specific error message.

若要能夠格式化具有縮排和空白字元的輸出、略過驗證,或是自訂轉義行為,請建立的實例JsonWriterOptions ,並將它傳遞給寫入器。To be able to format the output with indentation and white space, to skip validation, OR to customize the escaping behavior, create an instance of JsonWriterOptions and pass it in to the writer.

建構函式

Utf8JsonWriter(IBufferWriter<Byte>, JsonWriterOptions)

使用指定的 IBufferWriter<T> 來將輸出寫入和自訂選項,藉以將 Utf8JsonWriter 類別的新執行個體初始化。Initializes a new instance of the Utf8JsonWriter class using the specified IBufferWriter<T> to write the output to and customization options.

Utf8JsonWriter(Stream, JsonWriterOptions)

使用指定的串流來將輸出寫入和自訂選項,藉以將 Utf8JsonWriter 類別的新執行個體初始化。Initializes a new instance of the Utf8JsonWriter class using the specified stream to write the output to and customization options.

屬性

BytesCommitted

取得目前執行個體到目前為止認可至輸出的位元組總數。Gets the total number of bytes committed to the output by the current instance so far.

BytesPending

取得 Utf8JsonWriter 到目前為止所寫入但尚未排清到輸出並認可的位元組數目。Gets the number of bytes written by the Utf8JsonWriter so far that have not yet been flushed to the output and committed.

CurrentDepth

取得目前權杖的深度。Gets the depth of the current token.

Options

取得使用此執行個體寫入 JSON 時的自訂行為,指出是否要在寫入時將輸出格式化、是否要略過結構化 JSON 驗證,以及要逸出哪些字元。Gets the custom behavior when writing JSON using this instance, which indicates whether to format the output while writing, whether to skip structural JSON validation, and which characters to escape.

方法

Dispose()

認可尚未排清的任何剩餘 JSON 文字,並釋出目前執行個體使用的所有資源。Commits any leftover JSON text that has not yet been flushed and releases all resources used by the current instance.

DisposeAsync()

以非同步方式認可尚未排清的任何剩餘 JSON 文字,並釋出目前執行個體使用的所有資源。Asynchronously commits any leftover JSON text that has not yet been flushed and releases all resources used by the current instance.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
Flush()

認可到目前為止所寫入的 JSON 文字,以便向輸出目的地顯示。Commits the JSON text written so far, which makes it visible to the output destination.

FlushAsync(CancellationToken)

以非同步方式認可到目前為止所寫入的 JSON 文字,以便向輸出目的地顯示。Asynchronously commits the JSON text written so far, which makes it visible to the output destination.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
Reset()

重設此執行個體的內部狀態,使其能重複使用。Resets the internal state of this instance so that it can be reused.

Reset(IBufferWriter<Byte>)

重設此執行個體的內部狀態,使其能重複用於 IBufferWriter<T> 的新執行個體。Resets the internal state of this instance so that it can be reused with a new instance of IBufferWriter<T>.

Reset(Stream)

重設此執行個體的內部狀態,使其能重複用於 Stream 的新執行個體。Resets the internal state of this instance so that it can be reused with a new instance of Stream.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)
WriteBase64String(JsonEncodedText, ReadOnlySpan<Byte>)

寫入預先編碼的屬性名稱和原始位元組值 (以 Base 64 編碼的 JSON 字串形式),成為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and raw bytes value (as a Base64 encoded JSON string) as part of a name/value pair of a JSON object.

WriteBase64String(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

寫入屬性名稱和原始位元組值 (以 Base64 編碼 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes the property name and raw bytes value (as a Base64 encoded JSON string) as part of a name/value pair of a JSON object.

WriteBase64String(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

寫入屬性名稱和原始位元組值 (以 Base64 編碼 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes the property name and raw bytes value (as a Base64 encoded JSON string) as part of a name/value pair of a JSON object.

WriteBase64String(String, ReadOnlySpan<Byte>)

寫入屬性名稱和原始位元組值 (以 Base64 編碼 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes the property name and raw bytes value (as a Base64 encoded JSON string) as part of a name/value pair of a JSON object.

WriteBase64StringValue(ReadOnlySpan<Byte>)

以 Base64 編碼 JSON 字串將原始位元組值寫入為 JSON 陣列元素。Writes the raw bytes value as a Base64 encoded JSON string as an element of a JSON array.

WriteBoolean(JsonEncodedText, Boolean)

寫入預先編碼的屬性名稱和 Boolean 值 (以 JSON 常值 truefalse),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and Boolean value (as a JSON literal true or false) as part of a name/value pair of a JSON object.

WriteBoolean(ReadOnlySpan<Byte>, Boolean)

寫入屬性名稱 (指定為唯讀位元組範圍) 和 Boolean 值 (以 JSON 常值 truefalse),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only span of bytes and a Boolean value (as a JSON literal true or false) as part of a name/value pair of a JSON object.

WriteBoolean(ReadOnlySpan<Char>, Boolean)

寫入屬性名稱 (指定為唯讀字元範圍) 和 Boolean 值 (以 JSON 常值 truefalse),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only character span and a Boolean value (as a JSON literal true or false) as part of a name/value pair of a JSON object.

WriteBoolean(String, Boolean)

寫入屬性名稱 (指定為字串) 和 Boolean 值 (以 JSON 常值 truefalse),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and a Boolean value (as a JSON literal true or false) as part of a name/value pair of a JSON object.

WriteBooleanValue(Boolean)

寫入 Boolean 值 (以 JSON 常值 truefalse),作為 JSON 陣列的元素。Writes a Boolean value (as a JSON literal true or false) as an element of a JSON array.

WriteCommentValue(ReadOnlySpan<Byte>)

寫入 UTF-8 文字值作為 JSON 註解。Writes a UTF-8 text value as a JSON comment.

WriteCommentValue(ReadOnlySpan<Char>)

寫入 UTF-16 文字值作為 JSON 註解。Writes a UTF-16 text value as a JSON comment.

WriteCommentValue(String)

寫入字串文字值作為 JSON 註解。Writes a string text value as a JSON comment.

WriteEndArray()

寫入 JSON 陣列的結尾。Writes the end of a JSON array.

WriteEndObject()

寫入 JSON 物件的結尾。Writes the end of a JSON object.

WriteNull(JsonEncodedText)

寫入預先編碼的屬性名稱和 JSON 常值 null,作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and the JSON literal null as part of a name/value pair of a JSON object.

WriteNull(ReadOnlySpan<Byte>)

寫入屬性名稱 (指定為唯讀位元組範圍) 和 JSON 常值 null,作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only span of bytes and the JSON literal null as part of a name/value pair of a JSON object.

WriteNull(ReadOnlySpan<Char>)

寫入屬性名稱 (指定為唯讀字元範圍) 和 JSON 常值 null,作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only character span and the JSON literal null as part of a name/value pair of a JSON object.

WriteNull(String)

寫入屬性名稱 (指定為字串) 和 JSON 常值 null,作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and the JSON literal null as part of a name/value pair of a JSON object.

WriteNullValue()

寫入 JSON 常值 null,作為 JSON 陣列的元素。Writes the JSON literal null as an element of a JSON array.

WriteNumber(JsonEncodedText, Decimal)

寫入預先編碼的屬性名稱和 Decimal 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and Decimal value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(JsonEncodedText, Double)

寫入預先編碼的屬性名稱和 Double 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and Double value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(JsonEncodedText, Int32)

寫入預先編碼的屬性名稱和 Int32 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and Int32 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(JsonEncodedText, Int64)

寫入預先編碼的屬性名稱和 Int64 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and Int64 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(JsonEncodedText, Single)

寫入預先編碼的屬性名稱和 Single 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and Single value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(JsonEncodedText, UInt32)

寫入預先編碼的屬性名稱和 UInt32 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and UInt32 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(JsonEncodedText, UInt64)

寫入預先編碼的屬性名稱和 UInt64 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and UInt64 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(ReadOnlySpan<Byte>, Decimal)

寫入屬性名稱 (指定為唯讀位元組範圍) 和 Decimal 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only span of bytes and a Decimal value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(ReadOnlySpan<Byte>, Double)

寫入屬性名稱 (指定為唯讀位元組範圍) 和 Double 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only span of bytes and a Double value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(ReadOnlySpan<Byte>, Int32)

寫入屬性名稱 (指定為唯讀位元組範圍) 和 Int32 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only span of bytes and an Int32 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(ReadOnlySpan<Byte>, Int64)

寫入屬性名稱 (指定為唯讀位元組範圍) 和 Int64 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only span of bytes and an Int64 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(ReadOnlySpan<Byte>, Single)

寫入屬性名稱 (指定為唯讀位元組範圍) 和 Single 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only span of bytes and a Single value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(ReadOnlySpan<Byte>, UInt32)

寫入屬性名稱 (指定為唯讀位元組範圍) 和 UInt32 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only span of bytes and a UInt32 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(ReadOnlySpan<Byte>, UInt64)

寫入屬性名稱 (指定為唯讀位元組範圍) 和 UInt64 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only span of bytes and a UInt64 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(ReadOnlySpan<Char>, Decimal)

寫入屬性名稱 (指定為唯讀字元範圍) 和 Decimal 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only character span and a Decimal value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(ReadOnlySpan<Char>, Double)

寫入屬性名稱 (指定為唯讀字元範圍) 和 Double 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only character span and a Double value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(ReadOnlySpan<Char>, Int32)

寫入屬性名稱 (指定為唯讀字元範圍) 和 Int32 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only character span and an Int32 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(ReadOnlySpan<Char>, Int64)

寫入屬性名稱 (指定為唯讀字元範圍) 和 Int64 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only character span and an Int64 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(ReadOnlySpan<Char>, Single)

寫入屬性名稱 (指定為唯讀字元範圍) 和 Single 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only character span and a Single value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(ReadOnlySpan<Char>, UInt32)

寫入屬性名稱 (指定為唯讀字元範圍) 和 UInt32 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only character span and a UInt32 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(ReadOnlySpan<Char>, UInt64)

寫入屬性名稱 (指定為唯讀字元範圍) 和 UInt64 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only character span and a UInt64 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(String, Decimal)

寫入屬性名稱 (指定為字串) 和 Decimal 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and a Decimal value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(String, Double)

寫入屬性名稱 (指定為字串) 和 Double 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and a Double value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(String, Int32)

寫入屬性名稱 (指定為字串) 和 Int32 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and an Int32 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(String, Int64)

寫入屬性名稱 (指定為字串) 和 Int64 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and an Int64 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(String, Single)

寫入屬性名稱 (指定為字串) 和 Single 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and a Single value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(String, UInt32)

寫入屬性名稱 (指定為字串) 和 UInt32 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and a UInt32 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumber(String, UInt64)

寫入屬性名稱 (指定為字串) 和 UInt64 值 (以 JSON 數字),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and a UInt64 value (as a JSON number) as part of a name/value pair of a JSON object.

WriteNumberValue(Decimal)

寫入 Decimal 值 (以 JSON 數字),作為 JSON 陣列的項目。Writes a Decimal value (as a JSON number) as an element of a JSON array.

WriteNumberValue(Double)

寫入 Double 值 (以 JSON 數字),作為 JSON 陣列的項目。Writes a Double value (as a JSON number) as an element of a JSON array.

WriteNumberValue(Int32)

寫入 Int32 值 (以 JSON 數字),作為 JSON 陣列的項目。Writes an Int32 value (as a JSON number) as an element of a JSON array.

WriteNumberValue(Int64)

寫入 Int64 值 (以 JSON 數字),作為 JSON 陣列的項目。Writes an Int64 value (as a JSON number) as an element of a JSON array.

WriteNumberValue(Single)

寫入 Single 值 (以 JSON 數字),作為 JSON 陣列的項目。Writes a Single value (as a JSON number) as an element of a JSON array.

WriteNumberValue(UInt32)

寫入 UInt32 值 (以 JSON 數字),作為 JSON 陣列的項目。Writes a UInt32 value (as a JSON number) as an element of a JSON array.

WriteNumberValue(UInt64)

寫入 UInt64 值 (以 JSON 數字),作為 JSON 陣列的項目。Writes a UInt64 value (as a JSON number) as an element of a JSON array.

WritePropertyName(JsonEncodedText)

寫入預先編碼的屬性名稱 (以 JSON 字串形式),作為 JSON 物件名稱/值組的第一部分。Writes the pre-encoded property name (as a JSON string) as the first part of a name/value pair of a JSON object.

WritePropertyName(ReadOnlySpan<Byte>)

寫入 UTF-8 屬性名稱 (以 JSON 字串形式),作為 JSON 物件名稱/值組的第一部分。Writes the UTF-8 property name (as a JSON string) as the first part of a name/value pair of a JSON object.

WritePropertyName(ReadOnlySpan<Char>)

寫入屬性名稱 (以 JSON 字串形式),作為 JSON 物件名稱/值組的第一部分。Writes the property name (as a JSON string) as the first part of a name/value pair of a JSON object.

WritePropertyName(String)

寫入屬性名稱 (以 JSON 字串形式),作為 JSON 物件名稱/值組的第一部分。Writes the property name (as a JSON string) as the first part of a name/value pair of a JSON object.

WriteStartArray()

寫入 JSON 陣列的開頭。Writes the beginning of a JSON array.

WriteStartArray(JsonEncodedText)

以預先編碼的屬性名稱作為索引鍵,寫入 JSON 陣列的開頭。Writes the beginning of a JSON array with a pre-encoded property name as the key.

WriteStartArray(ReadOnlySpan<Byte>)

以屬性名稱 (指定為唯讀位元組範圍) 作為索引鍵,寫入 JSON 陣列的開頭。Writes the beginning of a JSON array with a property name specified as a read-only span of bytes as the key.

WriteStartArray(ReadOnlySpan<Char>)

以屬性名稱 (指定為唯讀字元範圍) 作為索引鍵,寫入 JSON 陣列的開頭。Writes the beginning of a JSON array with a property name specified as a read-only character span as the key.

WriteStartArray(String)

以屬性名稱 (指定為字串) 作為索引鍵,寫入 JSON 陣列的開頭。Writes the beginning of a JSON array with a property name specified as a string as the key.

WriteStartObject()

寫入 JSON 物件的開頭。Writes the beginning of a JSON object.

WriteStartObject(JsonEncodedText)

以預先編碼的屬性名稱作為索引鍵,寫入 JSON 物件的開頭。Writes the beginning of a JSON object with a pre-encoded property name as the key.

WriteStartObject(ReadOnlySpan<Byte>)

以屬性名稱 (指定為唯讀位元組範圍) 作為索引鍵,寫入 JSON 物件的開頭。Writes the beginning of a JSON object with a property name specified as a read-only span of bytes as the key.

WriteStartObject(ReadOnlySpan<Char>)

以屬性名稱 (指定為唯讀字元範圍) 作為索引鍵,寫入 JSON 物件的開頭。Writes the beginning of a JSON object with a property name specififed as a read-only character span as the key.

WriteStartObject(String)

以屬性名稱 (指定為字串) 作為索引鍵,寫入 JSON 物件的開頭。Writes the beginning of a JSON object with a property name specified as a string as the key.

WriteString(JsonEncodedText, DateTime)

寫入預先編碼的屬性名稱和 DateTime 值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and DateTime value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(JsonEncodedText, DateTimeOffset)

寫入預先編碼的屬性名稱和 DateTimeOffset 值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and DateTimeOffset value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(JsonEncodedText, Guid)

寫入預先編碼的屬性名稱和 Guid 值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and Guid value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(JsonEncodedText, JsonEncodedText)

寫入預先編碼的屬性名稱和預先編碼的值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and pre-encoded value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(JsonEncodedText, ReadOnlySpan<Byte>)

寫入預先編碼的屬性名稱和 UTF-8 文字值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and UTF-8 text value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(JsonEncodedText, ReadOnlySpan<Char>)

寫入預先編碼的屬性名稱和文字值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and text value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(JsonEncodedText, String)

寫入預先編碼的屬性名稱和字串文字值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes the pre-encoded property name and string text value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(ReadOnlySpan<Byte>, DateTime)

寫入 UTF-8 屬性名稱和 DateTime 值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a UTF-8 property name and a DateTime value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(ReadOnlySpan<Byte>, DateTimeOffset)

寫入 UTF-8 屬性名稱和 DateTimeOffset 值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a UTF-8 property name and a DateTimeOffset value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(ReadOnlySpan<Byte>, Guid)

寫入 UTF-8 屬性名稱和 Guid 值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a UTF-8 property name and a Guid value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(ReadOnlySpan<Byte>, JsonEncodedText)

寫入 UTF-8 屬性名稱和預先編碼的值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes the UTF-8 property name and pre-encoded value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

寫入 UTF-8 屬性名稱和 UTF-8 文字值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a UTF-8 property name and UTF-8 text value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(ReadOnlySpan<Byte>, ReadOnlySpan<Char>)

寫入 UTF-8 屬性名稱和 UTF-16 文字值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a UTF-8 property name and UTF-16 text value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(ReadOnlySpan<Byte>, String)

寫入 UTF-8 屬性名稱和字串文字值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a UTF-8 property name and string text value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(ReadOnlySpan<Char>, DateTime)

寫入屬性名稱 (指定為唯讀字元範圍) 和 DateTime 值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only character span and a DateTime value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(ReadOnlySpan<Char>, DateTimeOffset)

寫入屬性名稱 (指定為唯讀字元範圍) 和 DateTimeOffset 值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only character span and a DateTimeOffset value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(ReadOnlySpan<Char>, Guid)

寫入屬性名稱 (指定為唯讀字元範圍) 和 Guid 值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a read-only character span and a Guid value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(ReadOnlySpan<Char>, JsonEncodedText)

寫入屬性名稱和預先編碼的值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes the property name and pre-encoded value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

寫入 UTF-16 屬性名稱和 UTF-8 文字值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a UTF-16 property name and UTF-8 text value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(ReadOnlySpan<Char>, ReadOnlySpan<Char>)

寫入 UTF-16 屬性名稱和 UTF-16 文字值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a UTF-16 property name and UTF-16 text value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(ReadOnlySpan<Char>, String)

寫入 UTF-16 屬性名稱和字串文字值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a UTF-16 property name and string text value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(String, DateTime)

寫入屬性名稱 (指定為字串) 和 DateTime 值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and a DateTime value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(String, DateTimeOffset)

寫入屬性名稱 (指定為字串) 和 DateTimeOffset 值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and a DateTimeOffset value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(String, Guid)

寫入屬性名稱 (指定為字串) 和 Guid 值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and a Guid value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(String, JsonEncodedText)

寫入屬性名稱和預先編碼的值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes the property name and pre-encoded value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(String, ReadOnlySpan<Byte>)

寫入屬性名稱 (指定為字串) 和 UTF-8 文字值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and a UTF-8 text value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(String, ReadOnlySpan<Char>)

寫入屬性名稱 (指定為字串) 和 UTF-16 文字值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and a UTF-16 text value (as a JSON string) as part of a name/value pair of a JSON object.

WriteString(String, String)

寫入屬性名稱 (指定為字串) 和字串文字值 (以 JSON 字串),作為 JSON 物件名稱/值組的一部分。Writes a property name specified as a string and a string text value (as a JSON string) as part of a name/value pair of a JSON object.

WriteStringValue(DateTime)

寫入 DateTime 值 (以 JSON 字串),作為 JSON 陣列的項目。Writes a DateTime value (as a JSON string) as an element of a JSON array.

WriteStringValue(DateTimeOffset)

寫入 DateTimeOffset 值 (以 JSON 字串),作為 JSON 陣列的項目。Writes a DateTimeOffset value (as a JSON string) as an element of a JSON array.

WriteStringValue(Guid)

寫入 Guid 值 (以 JSON 字串),作為 JSON 陣列的項目。Writes a Guid value (as a JSON string) as an element of a JSON array.

WriteStringValue(JsonEncodedText)

寫入預先編碼的文字值 (以 JSON 字串),作為 JSON 陣列的元素。Writes the pre-encoded text value (as a JSON string) as an element of a JSON array.

WriteStringValue(ReadOnlySpan<Byte>)

寫入 UTF-8 文字值 (以 JSON 字串),作為 JSON 陣列的項目。Writes a UTF-8 text value (as a JSON string) as an element of a JSON array.

WriteStringValue(ReadOnlySpan<Char>)

寫入 UTF-16 文字值 (以 JSON 字串),作為 JSON 陣列的項目。Writes a UTF-16 text value (as a JSON string) as an element of a JSON array.

WriteStringValue(String)

寫入字串文字值 (以 JSON 字串),作為 JSON 陣列的項目。Writes a string text value (as a JSON string) as an element of a JSON array.

擴充方法

ConfigureAwait(IAsyncDisposable, Boolean)

設定如何執行從非同步可處置項目傳回的工作 await。Configures how awaits on the tasks returned from an async disposable are performed.

適用於