Utf8JsonWriter.WritePropertyName 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| WritePropertyName(ReadOnlySpan<Byte>) |
將 UTF-8 屬性名稱(以 JSON 字串形式)寫入 JSON 物件名稱/值對的第一部分。 |
| WritePropertyName(ReadOnlySpan<Char>) |
將屬性名稱(以 JSON 字串形式)寫入 JSON 物件名稱/值對的第一部分。 |
| WritePropertyName(String) |
將屬性名稱(以 JSON 字串形式)寫入 JSON 物件名稱/值對的第一部分。 |
| WritePropertyName(JsonEncodedText) |
將預先編碼的屬性名稱(以 JSON 字串形式)寫入 JSON 物件名稱/值對的第一部分。 |
WritePropertyName(ReadOnlySpan<Byte>)
將 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>)
將屬性名稱(以 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。
備註
在寫字前,房產名稱就已經被遺漏了。
適用於
WritePropertyName(String)
將屬性名稱(以 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。
propertyName 是 null。
備註
在寫字前,房產名稱就已經被遺漏了。
適用於
WritePropertyName(JsonEncodedText)
將預先編碼的屬性名稱(以 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。
備註
在建立 的 JsonEncodedText 實例時,屬性名稱應該已經脫離了。