語言

Utf8JsonWriter.WriteStartObject 方法

定義

多載

名稱 Description
WriteStartObject(JsonEncodedText)

它會寫入一個 JSON 物件的開頭,並以預先編碼的屬性名稱作為鍵。

WriteStartObject(ReadOnlySpan<Char>)

它會寫入一個 JSON 物件的開頭,並以只讀字元區間作為鍵值指定屬性名稱。

WriteStartObject(String)

它會寫入一個 JSON 物件的開頭,並以字串指定屬性名稱作為鍵。

WriteStartObject()

寫入 JSON 物件的開頭。

WriteStartObject(ReadOnlySpan<Byte>)

它會寫入一個 JSON 物件的開頭,並以只讀的位元組區段作為鍵值。

WriteStartObject(JsonEncodedText)

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

它會寫入一個 JSON 物件的開頭,並以預先編碼的屬性名稱作為鍵。

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

參數

propertyName
JsonEncodedText

要轉碼並寫成 UTF-8 的 JSON 編碼屬性名稱。

例外狀況

JSON的深度已超過最大1,000層。

-或-

已啟用驗證,若此方法會寫入無效 JSON。

備註

在建立 的 JsonEncodedText 實例時,屬性名稱應該已經脫離了。

適用於

WriteStartObject(ReadOnlySpan<Char>)

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

它會寫入一個 JSON 物件的開頭,並以只讀字元區間作為鍵值指定屬性名稱。

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

參數

propertyName
ReadOnlySpan<Char>

將要轉碼並寫成 UTF-8 的 JSON 物件的 UTF-16 編碼屬性名稱。

例外狀況

指定的物業名稱太大。

JSON 的深度超過 1,000 的最大深度。

-或-

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

備註

在寫字前,房產名稱就已經被遺漏了。

適用於

WriteStartObject(String)

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

它會寫入一個 JSON 物件的開頭,並以字串指定屬性名稱作為鍵。

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

參數

propertyName
String

將要轉碼並寫成 UTF-8 的 JSON 物件的 UTF-16 編碼屬性名稱。

例外狀況

指定的物業名稱太大。

JSON 的深度超過 1,000 的最大深度。

-或-

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

參數 propertyName 為 null。

備註

在寫字前,房產名稱就已經被遺漏了。

適用於

WriteStartObject()

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

寫入 JSON 物件的開頭。

public:
 void WriteStartObject();
public void WriteStartObject();
member this.WriteStartObject : unit -> unit
Public Sub WriteStartObject ()

例外狀況

JSON 的深度超過 1,000 的最大深度。

-或-

啟用驗證,操作會導致寫入無效的 JSON。

適用於

WriteStartObject(ReadOnlySpan<Byte>)

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

它會寫入一個 JSON 物件的開頭,並以只讀的位元組區段作為鍵值。

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

參數

utf8PropertyName
ReadOnlySpan<Byte>

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

例外狀況

指定的物業名稱太大。

JSON 的深度超過 1,000 的最大深度。

-或-

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

備註

在寫字前,房產名稱就已經被遺漏了。

適用於