Utf8JsonWriter.WritePropertyName 方法

定義

多載

WritePropertyName(JsonEncodedText)

寫入預先編碼的屬性名稱 (以 JSON 字串形式),作為 JSON 物件名稱/值組的第一部分。

WritePropertyName(String)

寫入屬性名稱 (以 JSON 字串形式),作為 JSON 物件名稱/值組的第一部分。

WritePropertyName(ReadOnlySpan<Byte>)

寫入 UTF-8 屬性名稱 (以 JSON 字串形式),作為 JSON 物件名稱/值組的第一部分。

WritePropertyName(ReadOnlySpan<Char>)

寫入屬性名稱 (以 JSON 字串形式),作為 JSON 物件名稱/值組的第一部分。

WritePropertyName(JsonEncodedText)

來源:
Utf8JsonWriter.WriteProperties.String.cs
來源:
Utf8JsonWriter.WriteProperties.String.cs
來源:
Utf8JsonWriter.WriteProperties.String.cs

寫入預先編碼的屬性名稱 (以 JSON 字串形式),作為 JSON 物件名稱/值組的第一部分。

public:
 void WritePropertyName(System::Text::Json::JsonEncodedText propertyName);
public void WritePropertyName (System.Text.Json.JsonEncodedText propertyName);
member this.WritePropertyName : System.Text.Json.JsonEncodedText -> unit
Public Sub WritePropertyName (propertyName As JsonEncodedText)

參數

propertyName
JsonEncodedText

要轉碼並寫入為 UTF-8 之 JSON 物件的 JSON 編碼屬性名稱。

例外狀況

已啟用驗證,且此寫入作業會產生無效的 JSON。

備註

建立 的實例 JsonEncodedText 時,應該已經逸出屬性名稱。

適用於

WritePropertyName(String)

來源:
Utf8JsonWriter.WriteProperties.String.cs
來源:
Utf8JsonWriter.WriteProperties.String.cs
來源:
Utf8JsonWriter.WriteProperties.String.cs

寫入屬性名稱 (以 JSON 字串形式),作為 JSON 物件名稱/值組的第一部分。

public:
 void WritePropertyName(System::String ^ propertyName);
public void WritePropertyName (string propertyName);
member this.WritePropertyName : string -> unit
Public Sub WritePropertyName (propertyName As String)

參數

propertyName
String

要轉碼並寫入為 UTF-8 的 JSON 物件屬性名稱。

例外狀況

指定的屬性名稱太大。

已啟用驗證,且此寫入作業會產生無效的 JSON。

propertyNamenull

備註

屬性名稱會在寫入之前逸出。

適用於

WritePropertyName(ReadOnlySpan<Byte>)

來源:
Utf8JsonWriter.WriteProperties.String.cs
來源:
Utf8JsonWriter.WriteProperties.String.cs
來源:
Utf8JsonWriter.WriteProperties.String.cs

寫入 UTF-8 屬性名稱 (以 JSON 字串形式),作為 JSON 物件名稱/值組的第一部分。

public:
 void WritePropertyName(ReadOnlySpan<System::Byte> utf8PropertyName);
public void WritePropertyName (ReadOnlySpan<byte> utf8PropertyName);
member this.WritePropertyName : ReadOnlySpan<byte> -> unit
Public Sub WritePropertyName (utf8PropertyName As ReadOnlySpan(Of Byte))

參數

utf8PropertyName
ReadOnlySpan<Byte>

要寫入之 JSON 物件的 UTF-8 編碼屬性名稱。

例外狀況

指定的屬性名稱太大。

已啟用驗證,且此寫入作業會產生無效的 JSON。

備註

屬性名稱會在寫入之前逸出。

適用於

WritePropertyName(ReadOnlySpan<Char>)

來源:
Utf8JsonWriter.WriteProperties.String.cs
來源:
Utf8JsonWriter.WriteProperties.String.cs
來源:
Utf8JsonWriter.WriteProperties.String.cs

寫入屬性名稱 (以 JSON 字串形式),作為 JSON 物件名稱/值組的第一部分。

public:
 void WritePropertyName(ReadOnlySpan<char> propertyName);
public void WritePropertyName (ReadOnlySpan<char> propertyName);
member this.WritePropertyName : ReadOnlySpan<char> -> unit
Public Sub WritePropertyName (propertyName As ReadOnlySpan(Of Char))

參數

propertyName
ReadOnlySpan<Char>

要轉碼並寫入為 UTF-8 的 JSON 物件屬性名稱。

例外狀況

指定的屬性名稱太大。

已啟用驗證,且此寫入作業會產生無效的 JSON。

備註

屬性名稱會在寫入之前逸出。

適用於