Editare

Partajați prin


Utf8JsonWriter.WriteStartObject Method

Definition

Overloads

WriteStartObject(JsonEncodedText)

Writes the beginning of a JSON object with a pre-encoded property name as the key.

WriteStartObject(String)

Writes the beginning of a JSON object with a property name specified as a string as the key.

WriteStartObject(ReadOnlySpan<Char>)

Writes the beginning of a JSON object with a property name specified as a read-only character span as the key.

WriteStartObject()

Writes the beginning of a JSON object.

WriteStartObject(ReadOnlySpan<Byte>)

Writes the beginning of a JSON object with a property name specified as a read-only span of bytes as the key.

WriteStartObject(JsonEncodedText)

Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs

Writes the beginning of a JSON object with a pre-encoded property name as the key.

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)

Parameters

propertyName
JsonEncodedText

The JSON encoded property name of the JSON object to be transcoded and written as UTF-8.

Exceptions

The depth of the JSON has exceeded the maximum depth of 1,000.

-or-

Validation is enabled, and this method would result in writing invalid JSON.

Remarks

The property name should already be escaped when the instance of JsonEncodedText was created.

Applies to

WriteStartObject(String)

Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs

Writes the beginning of a JSON object with a property name specified as a string as the key.

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

Parameters

propertyName
String

The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8.

Exceptions

The specified property name is too large.

The depth of the JSON exceeds the maximum depth of 1,000.

-or-

Validation is enabled, and this write operation would produce invalid JSON.

The propertyName parameter is null.

Remarks

The property name is escaped before writing.

Applies to

WriteStartObject(ReadOnlySpan<Char>)

Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs

Writes the beginning of a JSON object with a property name specified as a read-only character span as the key.

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))

Parameters

propertyName
ReadOnlySpan<Char>

The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8.

Exceptions

The specified property name is too large.

The depth of the JSON exceeds the maximum depth of 1,000.

-or-

Validation is enabled, and this write operation would produce invalid JSON.

Remarks

The property name is escaped before writing.

Applies to

WriteStartObject()

Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs

Writes the beginning of a JSON object.

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

Exceptions

The depth of the JSON exceeds the maximum depth of 1,000.

-or-

Validation is enabled, and the operation would result in writing invalid JSON.

Applies to

WriteStartObject(ReadOnlySpan<Byte>)

Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs

Writes the beginning of a JSON object with a property name specified as a read-only span of bytes as the key.

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))

Parameters

utf8PropertyName
ReadOnlySpan<Byte>

The UTF-8 encoded property name of the JSON object to be written.

Exceptions

The specified property name is too large.

The depth of the JSON exceeds the maximum depth of 1,000.

-or-

Validation is enabled, and this write operation would produce invalid JSON.

Remarks

The property name is escaped before writing.

Applies to