语言

Utf8JsonWriter.WritePropertyName 方法

定义

重载

名称 说明
WritePropertyName(ReadOnlySpan<Byte>)

将 UTF-8 属性名称(作为 JSON 字符串)写入 JSON 对象的名称/值对的第一部分。

WritePropertyName(ReadOnlySpan<Char>)

将属性名称(作为 JSON 字符串)写入 JSON 对象的名称/值对的第一部分。

WritePropertyName(String)

将属性名称(作为 JSON 字符串)写入 JSON 对象的名称/值对的第一部分。

WritePropertyName(JsonEncodedText)

将预编码的属性名称(作为 JSON 字符串)写入 JSON 对象的名称/值对的第一部分。

WritePropertyName(ReadOnlySpan<Byte>)

Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
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>)

Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
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。

注解

属性名称在写入之前进行转义。

适用于

WritePropertyName(String)

Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
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。

propertyName 是 null。

注解

属性名称在写入之前进行转义。

适用于

WritePropertyName(JsonEncodedText)

Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
Utf8JsonWriter.WriteProperties.String.cs
Source:
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 时,应已转义属性名称。

适用于