Redigera

Dela via


Utf8JsonWriter.WriteNull Method

Definition

Overloads

WriteNull(ReadOnlySpan<Byte>)

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

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)

Writes a property name specified as a string and the JSON literal null as part of a name/value pair of a JSON object.

WriteNull(JsonEncodedText)

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

Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs

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.

public:
 void WriteNull(ReadOnlySpan<System::Byte> utf8PropertyName);
public void WriteNull (ReadOnlySpan<byte> utf8PropertyName);
member this.WriteNull : ReadOnlySpan<byte> -> unit
Public Sub WriteNull (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.

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

Remarks

The property name is escaped before writing.

Applies to

WriteNull(ReadOnlySpan<Char>)

Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs

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.

public:
 void WriteNull(ReadOnlySpan<char> propertyName);
public void WriteNull (ReadOnlySpan<char> propertyName);
member this.WriteNull : ReadOnlySpan<char> -> unit
Public Sub WriteNull (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.

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

Remarks

The property name is escaped before writing.

Applies to

WriteNull(String)

Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs

Writes a property name specified as a string and the JSON literal null as part of a name/value pair of a JSON object.

public:
 void WriteNull(System::String ^ propertyName);
public void WriteNull (string propertyName);
member this.WriteNull : string -> unit
Public Sub WriteNull (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.

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

The propertyName parameter is null.

Remarks

The property name is escaped before writing.

Applies to

WriteNull(JsonEncodedText)

Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs
Source:
Utf8JsonWriter.WriteProperties.Literal.cs

Writes the pre-encoded property name and the JSON literal null as part of a name/value pair of a JSON object.

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

Parameters

propertyName
JsonEncodedText

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

Exceptions

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