Utf8JsonWriter.WriteNumber 方法

定义

重载

WriteNumber(String, Int32)

编写指定为字符串的属性名称和 Int32 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(String, Int64)

编写指定为字符串的属性名称和 Int64 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(String, Single)

编写指定为字符串的属性名称和 Single 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(String, UInt32)

编写指定为字符串的属性名称和 UInt32 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(String, UInt64)

编写指定为字符串的属性名称和 UInt64 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(JsonEncodedText, Single)

将预编码的属性名称和 Single 值(作为 JSON 数字)写入 JSON 对象的名称/值对。

WriteNumber(JsonEncodedText, Double)

将预编码的属性名称和 Double 值(作为 JSON 数字)写入 JSON 对象的名称/值对。

WriteNumber(JsonEncodedText, Int32)

将预编码的属性名称和 Int32 值(作为 JSON 数字)写入 JSON 对象的名称/值对。

WriteNumber(JsonEncodedText, Int64)

将预编码的属性名称和 Int64 值(作为 JSON 数字)写入 JSON 对象的名称/值对。

WriteNumber(String, Double)

编写指定为字符串的属性名称和 Double 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(JsonEncodedText, UInt32)

将预编码的属性名称和 UInt32 值(作为 JSON 数字)写入 JSON 对象的名称/值对。

WriteNumber(JsonEncodedText, Decimal)

将预编码的属性名称和 Decimal 值(作为 JSON 数字)写入 JSON 对象的名称/值对。

WriteNumber(String, Decimal)

编写指定为字符串的属性名称和 Decimal 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(JsonEncodedText, UInt64)

将预编码的属性名称和 UInt64 值(作为 JSON 数字)写入 JSON 对象的名称/值对。

WriteNumber(ReadOnlySpan<Char>, UInt32)

编写指定为只读字符范围的属性名称和 UInt32 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(ReadOnlySpan<Byte>, Decimal)

编写指定为字节只读范围的属性名称和 Decimal 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(ReadOnlySpan<Byte>, Double)

编写指定为字节只读范围的属性名称和 Double 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(ReadOnlySpan<Byte>, Int32)

编写指定为字节只读范围的属性名称和 Int32 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(ReadOnlySpan<Byte>, Int64)

编写指定为字节只读范围的属性名称和 Int64 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(ReadOnlySpan<Byte>, Single)

编写指定为字节只读范围的属性名称和 Single 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(ReadOnlySpan<Byte>, UInt32)

编写指定为字节只读范围的属性名称和 UInt32 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(ReadOnlySpan<Char>, UInt64)

编写指定为只读字符范围的属性名称和 UInt64 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(ReadOnlySpan<Char>, Decimal)

编写指定为只读字符范围的属性名称和 Decimal 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(ReadOnlySpan<Char>, Double)

编写指定为只读字符范围的属性名称和 Double 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(ReadOnlySpan<Char>, Int32)

编写指定为只读字符范围的属性名称和 Int32 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(ReadOnlySpan<Char>, Int64)

编写指定为只读字符范围的属性名称和 Int64 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(ReadOnlySpan<Char>, Single)

编写指定为只读字符范围的属性名称和 Single 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(ReadOnlySpan<Byte>, UInt64)

编写指定为字节只读范围的属性名称和 UInt64 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

WriteNumber(String, Int32)

Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs

编写指定为字符串的属性名称和 Int32 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(System::String ^ propertyName, int value);
public void WriteNumber (string propertyName, int value);
member this.WriteNumber : string * int -> unit
Public Sub WriteNumber (propertyName As String, value As Integer)

参数

propertyName
String

要进行转码并写为 UTF-8 的 JSON 对象的 UTF-16 编码属性名称。

value
Int32

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

propertyName 参数为 null

注解

Int32使用默认StandardFormat (“G”) 写入 ,例如 32767。

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

适用于

WriteNumber(String, Int64)

Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs

编写指定为字符串的属性名称和 Int64 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(System::String ^ propertyName, long value);
public void WriteNumber (string propertyName, long value);
member this.WriteNumber : string * int64 -> unit
Public Sub WriteNumber (propertyName As String, value As Long)

参数

propertyName
String

要进行转码并写为 UTF-8 的 JSON 对象的 UTF-16 编码属性名称。

value
Int64

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

propertyName 参数为 null

注解

Int64使用默认StandardFormat (“G”) 写入 ,例如 32767。

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

适用于

WriteNumber(String, Single)

Source:
Utf8JsonWriter.WriteProperties.Float.cs
Source:
Utf8JsonWriter.WriteProperties.Float.cs
Source:
Utf8JsonWriter.WriteProperties.Float.cs

编写指定为字符串的属性名称和 Single 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(System::String ^ propertyName, float value);
public void WriteNumber (string propertyName, float value);
member this.WriteNumber : string * single -> unit
Public Sub WriteNumber (propertyName As String, value As Single)

参数

propertyName
String

要进行转码并写为 UTF-8 的 JSON 对象的 UTF-16 编码属性名称。

value
Single

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

propertyName 参数为 null

注解

Single使用默认StandardFormat (即 .NET Core 3.0 或更高版本上的“G”) 写入 。 在任何其他框架上使用“G9”。

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

适用于

WriteNumber(String, UInt32)

Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs

重要

此 API 不符合 CLS。

编写指定为字符串的属性名称和 UInt32 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(System::String ^ propertyName, System::UInt32 value);
[System.CLSCompliant(false)]
public void WriteNumber (string propertyName, uint value);
[<System.CLSCompliant(false)>]
member this.WriteNumber : string * uint32 -> unit
Public Sub WriteNumber (propertyName As String, value As UInteger)

参数

propertyName
String

要进行转码并写为 UTF-8 的 JSON 对象的 UTF-16 编码属性名称。

value
UInt32

要以 JSON 数字形式作为名称/值对的一部分编写的值。

属性

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

propertyName 参数为 null

注解

UInt32使用默认StandardFormat (“G”) 写入 ,例如 32767。

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

适用于

WriteNumber(String, UInt64)

Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs

重要

此 API 不符合 CLS。

编写指定为字符串的属性名称和 UInt64 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(System::String ^ propertyName, System::UInt64 value);
[System.CLSCompliant(false)]
public void WriteNumber (string propertyName, ulong value);
[<System.CLSCompliant(false)>]
member this.WriteNumber : string * uint64 -> unit
Public Sub WriteNumber (propertyName As String, value As ULong)

参数

propertyName
String

要进行转码并写为 UTF-8 的 JSON 对象的 UTF-16 编码属性名称。

value
UInt64

要以 JSON 数字形式作为名称/值对的一部分编写的值。

属性

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

propertyName 参数为 null

注解

UInt64使用默认StandardFormat (“G”) 写入 ,例如 32767。

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

适用于

WriteNumber(JsonEncodedText, Single)

Source:
Utf8JsonWriter.WriteProperties.Float.cs
Source:
Utf8JsonWriter.WriteProperties.Float.cs
Source:
Utf8JsonWriter.WriteProperties.Float.cs

将预编码的属性名称和 Single 值(作为 JSON 数字)写入 JSON 对象的名称/值对。

public:
 void WriteNumber(System::Text::Json::JsonEncodedText propertyName, float value);
public void WriteNumber (System.Text.Json.JsonEncodedText propertyName, float value);
member this.WriteNumber : System.Text.Json.JsonEncodedText * single -> unit
Public Sub WriteNumber (propertyName As JsonEncodedText, value As Single)

参数

propertyName
JsonEncodedText

要进行转码并写为 UTF-8 的 JSON 对象的 JSON 编码属性名称。

value
Single

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

系统已启用验证,此方法将导致编写无效的 JSON。

注解

Single使用默认StandardFormat (即 .NET Core 3.0 或更高版本上的“G”) 写入 。 在任何其他框架上使用“G9”。

创建 实例 JsonEncodedText 时,属性名称应已转义。

适用于

WriteNumber(JsonEncodedText, Double)

Source:
Utf8JsonWriter.WriteProperties.Double.cs
Source:
Utf8JsonWriter.WriteProperties.Double.cs
Source:
Utf8JsonWriter.WriteProperties.Double.cs

将预编码的属性名称和 Double 值(作为 JSON 数字)写入 JSON 对象的名称/值对。

public:
 void WriteNumber(System::Text::Json::JsonEncodedText propertyName, double value);
public void WriteNumber (System.Text.Json.JsonEncodedText propertyName, double value);
member this.WriteNumber : System.Text.Json.JsonEncodedText * double -> unit
Public Sub WriteNumber (propertyName As JsonEncodedText, value As Double)

参数

propertyName
JsonEncodedText

要进行转码并写为 UTF-8 的 JSON 对象的 JSON 编码属性名称。

value
Double

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

系统已启用验证,此方法将导致编写无效的 JSON。

注解

Double使用默认StandardFormat (即 .NET Core 3.0 或更高版本上的“G”) 写入 。 在任何其他框架上使用“G17”。

创建 实例 JsonEncodedText 时,属性名称应已转义。

适用于

WriteNumber(JsonEncodedText, Int32)

Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs

将预编码的属性名称和 Int32 值(作为 JSON 数字)写入 JSON 对象的名称/值对。

public:
 void WriteNumber(System::Text::Json::JsonEncodedText propertyName, int value);
public void WriteNumber (System.Text.Json.JsonEncodedText propertyName, int value);
member this.WriteNumber : System.Text.Json.JsonEncodedText * int -> unit
Public Sub WriteNumber (propertyName As JsonEncodedText, value As Integer)

参数

propertyName
JsonEncodedText

要进行转码并写为 UTF-8 的 JSON 对象的 JSON 编码属性名称。

value
Int32

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

系统已启用验证,此方法将导致编写无效的 JSON。

注解

Int32使用默认StandardFormat ((即“G”) )写入 ,例如 32767。

创建 实例 JsonEncodedText 时,属性名称应已转义。

适用于

WriteNumber(JsonEncodedText, Int64)

Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs

将预编码的属性名称和 Int64 值(作为 JSON 数字)写入 JSON 对象的名称/值对。

public:
 void WriteNumber(System::Text::Json::JsonEncodedText propertyName, long value);
public void WriteNumber (System.Text.Json.JsonEncodedText propertyName, long value);
member this.WriteNumber : System.Text.Json.JsonEncodedText * int64 -> unit
Public Sub WriteNumber (propertyName As JsonEncodedText, value As Long)

参数

propertyName
JsonEncodedText

要进行转码并写为 UTF-8 的 JSON 对象的 JSON 编码属性名称。

value
Int64

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

系统已启用验证,此方法将导致编写无效的 JSON。

注解

Int64使用默认StandardFormat (“G”) (例如 32767)写入 。

创建 实例 JsonEncodedText 时,属性名称应已转义。

适用于

WriteNumber(String, Double)

Source:
Utf8JsonWriter.WriteProperties.Double.cs
Source:
Utf8JsonWriter.WriteProperties.Double.cs
Source:
Utf8JsonWriter.WriteProperties.Double.cs

编写指定为字符串的属性名称和 Double 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(System::String ^ propertyName, double value);
public void WriteNumber (string propertyName, double value);
member this.WriteNumber : string * double -> unit
Public Sub WriteNumber (propertyName As String, value As Double)

参数

propertyName
String

要进行转码并写为 UTF-8 的 JSON 对象的 UTF-16 编码属性名称。

value
Double

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

propertyName 参数为 null

注解

Double使用默认StandardFormat (即 .NET Core 3.0 或更高版本上的“G”) 写入 。 在任何其他框架上使用“G17”。

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

适用于

WriteNumber(JsonEncodedText, UInt32)

Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs

重要

此 API 不符合 CLS。

将预编码的属性名称和 UInt32 值(作为 JSON 数字)写入 JSON 对象的名称/值对。

public:
 void WriteNumber(System::Text::Json::JsonEncodedText propertyName, System::UInt32 value);
[System.CLSCompliant(false)]
public void WriteNumber (System.Text.Json.JsonEncodedText propertyName, uint value);
[<System.CLSCompliant(false)>]
member this.WriteNumber : System.Text.Json.JsonEncodedText * uint32 -> unit
Public Sub WriteNumber (propertyName As JsonEncodedText, value As UInteger)

参数

propertyName
JsonEncodedText

要进行转码并写为 UTF-8 的 JSON 对象的 JSON 编码属性名称。

value
UInt32

要以 JSON 数字形式作为名称/值对的一部分编写的值。

属性

例外

系统已启用验证,此方法将导致编写无效的 JSON。

注解

UInt32使用默认StandardFormat ((即“G”) )写入 ,例如 32767。

创建 实例 JsonEncodedText 时,属性名称应已转义。

适用于

WriteNumber(JsonEncodedText, Decimal)

Source:
Utf8JsonWriter.WriteProperties.Decimal.cs
Source:
Utf8JsonWriter.WriteProperties.Decimal.cs
Source:
Utf8JsonWriter.WriteProperties.Decimal.cs

将预编码的属性名称和 Decimal 值(作为 JSON 数字)写入 JSON 对象的名称/值对。

public:
 void WriteNumber(System::Text::Json::JsonEncodedText propertyName, System::Decimal value);
public void WriteNumber (System.Text.Json.JsonEncodedText propertyName, decimal value);
member this.WriteNumber : System.Text.Json.JsonEncodedText * decimal -> unit
Public Sub WriteNumber (propertyName As JsonEncodedText, value As Decimal)

参数

propertyName
JsonEncodedText

要进行转码并写为 UTF-8 的 JSON 对象的 JSON 编码属性名称。

value
Decimal

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

系统已启用验证,此方法将导致编写无效的 JSON。

注解

Decimal使用默认StandardFormat ((即“G”) )写入 。

创建 实例 JsonEncodedText 时,属性名称应已转义。

适用于

WriteNumber(String, Decimal)

Source:
Utf8JsonWriter.WriteProperties.Decimal.cs
Source:
Utf8JsonWriter.WriteProperties.Decimal.cs
Source:
Utf8JsonWriter.WriteProperties.Decimal.cs

编写指定为字符串的属性名称和 Decimal 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(System::String ^ propertyName, System::Decimal value);
public void WriteNumber (string propertyName, decimal value);
member this.WriteNumber : string * decimal -> unit
Public Sub WriteNumber (propertyName As String, value As Decimal)

参数

propertyName
String

要进行转码并写为 UTF-8 的 JSON 对象的 UTF-16 编码属性名称。

value
Decimal

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

propertyName 参数为 null

注解

Decimal使用默认StandardFormat ((即“G”) )写入 。

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

适用于

WriteNumber(JsonEncodedText, UInt64)

Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs

重要

此 API 不符合 CLS。

将预编码的属性名称和 UInt64 值(作为 JSON 数字)写入 JSON 对象的名称/值对。

public:
 void WriteNumber(System::Text::Json::JsonEncodedText propertyName, System::UInt64 value);
[System.CLSCompliant(false)]
public void WriteNumber (System.Text.Json.JsonEncodedText propertyName, ulong value);
[<System.CLSCompliant(false)>]
member this.WriteNumber : System.Text.Json.JsonEncodedText * uint64 -> unit
Public Sub WriteNumber (propertyName As JsonEncodedText, value As ULong)

参数

propertyName
JsonEncodedText

要进行转码并写为 UTF-8 的 JSON 对象的 JSON 编码属性名称。

value
UInt64

要以 JSON 数字形式作为名称/值对的一部分编写的值。

属性

例外

系统已启用验证,此方法将导致编写无效的 JSON。

注解

UInt64使用默认StandardFormat ((即“G”) )写入 ,例如 32767。

创建 实例 JsonEncodedText 时,属性名称应已转义。

适用于

WriteNumber(ReadOnlySpan<Char>, UInt32)

Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs

重要

此 API 不符合 CLS。

编写指定为只读字符范围的属性名称和 UInt32 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(ReadOnlySpan<char> propertyName, System::UInt32 value);
[System.CLSCompliant(false)]
public void WriteNumber (ReadOnlySpan<char> propertyName, uint value);
[<System.CLSCompliant(false)>]
member this.WriteNumber : ReadOnlySpan<char> * uint32 -> unit
Public Sub WriteNumber (propertyName As ReadOnlySpan(Of Char), value As UInteger)

参数

propertyName
ReadOnlySpan<Char>

要进行转码并写为 UTF-8 的 JSON 对象的 UTF-16 编码属性名称。

value
UInt32

要以 JSON 数字形式作为名称/值对的一部分编写的值。

属性

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

注解

UInt32使用默认StandardFormat ((即“G”) )写入 ,例如 32767。

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

适用于

WriteNumber(ReadOnlySpan<Byte>, Decimal)

Source:
Utf8JsonWriter.WriteProperties.Decimal.cs
Source:
Utf8JsonWriter.WriteProperties.Decimal.cs
Source:
Utf8JsonWriter.WriteProperties.Decimal.cs

编写指定为字节只读范围的属性名称和 Decimal 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(ReadOnlySpan<System::Byte> utf8PropertyName, System::Decimal value);
public void WriteNumber (ReadOnlySpan<byte> utf8PropertyName, decimal value);
member this.WriteNumber : ReadOnlySpan<byte> * decimal -> unit
Public Sub WriteNumber (utf8PropertyName As ReadOnlySpan(Of Byte), value As Decimal)

参数

utf8PropertyName
ReadOnlySpan<Byte>

要编写的 JSON 对象的 UTF-8 编码属性名称。

value
Decimal

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

注解

Decimal使用默认StandardFormat ((即“G”) )写入 。

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

适用于

WriteNumber(ReadOnlySpan<Byte>, Double)

Source:
Utf8JsonWriter.WriteProperties.Double.cs
Source:
Utf8JsonWriter.WriteProperties.Double.cs
Source:
Utf8JsonWriter.WriteProperties.Double.cs

编写指定为字节只读范围的属性名称和 Double 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(ReadOnlySpan<System::Byte> utf8PropertyName, double value);
public void WriteNumber (ReadOnlySpan<byte> utf8PropertyName, double value);
member this.WriteNumber : ReadOnlySpan<byte> * double -> unit
Public Sub WriteNumber (utf8PropertyName As ReadOnlySpan(Of Byte), value As Double)

参数

utf8PropertyName
ReadOnlySpan<Byte>

要编写的 JSON 对象的 UTF-8 编码属性名称。

value
Double

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

注解

Double使用默认StandardFormat (即 .NET Core 3.0 或更高版本上的“G”) 写入 。 在任何其他框架上使用“G17”。

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

适用于

WriteNumber(ReadOnlySpan<Byte>, Int32)

Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs

编写指定为字节只读范围的属性名称和 Int32 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(ReadOnlySpan<System::Byte> utf8PropertyName, int value);
public void WriteNumber (ReadOnlySpan<byte> utf8PropertyName, int value);
member this.WriteNumber : ReadOnlySpan<byte> * int -> unit
Public Sub WriteNumber (utf8PropertyName As ReadOnlySpan(Of Byte), value As Integer)

参数

utf8PropertyName
ReadOnlySpan<Byte>

要编写的 JSON 对象的 UTF-8 编码属性名称。

value
Int32

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

注解

Int32使用默认StandardFormat ((即“G”) )写入 ,例如 32767。

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

适用于

WriteNumber(ReadOnlySpan<Byte>, Int64)

Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs

编写指定为字节只读范围的属性名称和 Int64 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(ReadOnlySpan<System::Byte> utf8PropertyName, long value);
public void WriteNumber (ReadOnlySpan<byte> utf8PropertyName, long value);
member this.WriteNumber : ReadOnlySpan<byte> * int64 -> unit
Public Sub WriteNumber (utf8PropertyName As ReadOnlySpan(Of Byte), value As Long)

参数

utf8PropertyName
ReadOnlySpan<Byte>

要编写的 JSON 对象的 UTF-8 编码属性名称。

value
Int64

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

注解

Int64使用默认StandardFormat ((即“G”) )写入 ,例如 32767。

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

适用于

WriteNumber(ReadOnlySpan<Byte>, Single)

Source:
Utf8JsonWriter.WriteProperties.Float.cs
Source:
Utf8JsonWriter.WriteProperties.Float.cs
Source:
Utf8JsonWriter.WriteProperties.Float.cs

编写指定为字节只读范围的属性名称和 Single 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(ReadOnlySpan<System::Byte> utf8PropertyName, float value);
public void WriteNumber (ReadOnlySpan<byte> utf8PropertyName, float value);
member this.WriteNumber : ReadOnlySpan<byte> * single -> unit
Public Sub WriteNumber (utf8PropertyName As ReadOnlySpan(Of Byte), value As Single)

参数

utf8PropertyName
ReadOnlySpan<Byte>

要编写的 JSON 对象的 UTF-8 编码属性名称。

value
Single

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

注解

Single使用默认StandardFormat (即 .NET Core 3.0 或更高版本上的“G”) 写入 。 在任何其他框架上使用“G9”。

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

适用于

WriteNumber(ReadOnlySpan<Byte>, UInt32)

Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs

重要

此 API 不符合 CLS。

编写指定为字节只读范围的属性名称和 UInt32 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(ReadOnlySpan<System::Byte> utf8PropertyName, System::UInt32 value);
[System.CLSCompliant(false)]
public void WriteNumber (ReadOnlySpan<byte> utf8PropertyName, uint value);
[<System.CLSCompliant(false)>]
member this.WriteNumber : ReadOnlySpan<byte> * uint32 -> unit
Public Sub WriteNumber (utf8PropertyName As ReadOnlySpan(Of Byte), value As UInteger)

参数

utf8PropertyName
ReadOnlySpan<Byte>

要编写的 JSON 对象的 UTF-8 编码属性名称。

value
UInt32

要以 JSON 数字形式作为名称/值对的一部分编写的值。

属性

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

注解

UInt32使用默认StandardFormat (“G”) 写入 ,例如 32767。

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

适用于

WriteNumber(ReadOnlySpan<Char>, UInt64)

Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs

重要

此 API 不符合 CLS。

编写指定为只读字符范围的属性名称和 UInt64 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(ReadOnlySpan<char> propertyName, System::UInt64 value);
[System.CLSCompliant(false)]
public void WriteNumber (ReadOnlySpan<char> propertyName, ulong value);
[<System.CLSCompliant(false)>]
member this.WriteNumber : ReadOnlySpan<char> * uint64 -> unit
Public Sub WriteNumber (propertyName As ReadOnlySpan(Of Char), value As ULong)

参数

propertyName
ReadOnlySpan<Char>

要进行转码并写为 UTF-8 的 JSON 对象的 UTF-16 编码属性名称。

value
UInt64

要以 JSON 数字形式作为名称/值对的一部分编写的值。

属性

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

注解

UInt64使用默认StandardFormat (“G”) 写入 ,例如 32767。

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

适用于

WriteNumber(ReadOnlySpan<Char>, Decimal)

Source:
Utf8JsonWriter.WriteProperties.Decimal.cs
Source:
Utf8JsonWriter.WriteProperties.Decimal.cs
Source:
Utf8JsonWriter.WriteProperties.Decimal.cs

编写指定为只读字符范围的属性名称和 Decimal 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(ReadOnlySpan<char> propertyName, System::Decimal value);
public void WriteNumber (ReadOnlySpan<char> propertyName, decimal value);
member this.WriteNumber : ReadOnlySpan<char> * decimal -> unit
Public Sub WriteNumber (propertyName As ReadOnlySpan(Of Char), value As Decimal)

参数

propertyName
ReadOnlySpan<Char>

要进行转码并写为 UTF-8 的 JSON 对象的 UTF-16 编码属性名称。

value
Decimal

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

注解

Decimal使用默认StandardFormat ((即“G”) )写入 。

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

适用于

WriteNumber(ReadOnlySpan<Char>, Double)

Source:
Utf8JsonWriter.WriteProperties.Double.cs
Source:
Utf8JsonWriter.WriteProperties.Double.cs
Source:
Utf8JsonWriter.WriteProperties.Double.cs

编写指定为只读字符范围的属性名称和 Double 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(ReadOnlySpan<char> propertyName, double value);
public void WriteNumber (ReadOnlySpan<char> propertyName, double value);
member this.WriteNumber : ReadOnlySpan<char> * double -> unit
Public Sub WriteNumber (propertyName As ReadOnlySpan(Of Char), value As Double)

参数

propertyName
ReadOnlySpan<Char>

要进行转码并写为 UTF-8 的 JSON 对象的 UTF-16 编码属性名称。

value
Double

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

注解

Double使用默认StandardFormat (即 .NET Core 3.0 或更高版本上的“G”) 写入 。 在任何其他框架上使用“G17”。

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

适用于

WriteNumber(ReadOnlySpan<Char>, Int32)

Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs

编写指定为只读字符范围的属性名称和 Int32 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(ReadOnlySpan<char> propertyName, int value);
public void WriteNumber (ReadOnlySpan<char> propertyName, int value);
member this.WriteNumber : ReadOnlySpan<char> * int -> unit
Public Sub WriteNumber (propertyName As ReadOnlySpan(Of Char), value As Integer)

参数

propertyName
ReadOnlySpan<Char>

要进行转码并写为 UTF-8 的 JSON 对象的 UTF-16 编码属性名称。

value
Int32

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

注解

Int32使用默认StandardFormat (“G”) 写入 ,例如 32767。

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

适用于

WriteNumber(ReadOnlySpan<Char>, Int64)

Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.SignedNumber.cs

编写指定为只读字符范围的属性名称和 Int64 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(ReadOnlySpan<char> propertyName, long value);
public void WriteNumber (ReadOnlySpan<char> propertyName, long value);
member this.WriteNumber : ReadOnlySpan<char> * int64 -> unit
Public Sub WriteNumber (propertyName As ReadOnlySpan(Of Char), value As Long)

参数

propertyName
ReadOnlySpan<Char>

要进行转码并写为 UTF-8 的 JSON 对象的 UTF-16 编码属性名称。

value
Int64

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

注解

Int64使用默认StandardFormat (“G”) 写入 ,例如 32767。

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

适用于

WriteNumber(ReadOnlySpan<Char>, Single)

Source:
Utf8JsonWriter.WriteProperties.Float.cs
Source:
Utf8JsonWriter.WriteProperties.Float.cs
Source:
Utf8JsonWriter.WriteProperties.Float.cs

编写指定为只读字符范围的属性名称和 Single 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(ReadOnlySpan<char> propertyName, float value);
public void WriteNumber (ReadOnlySpan<char> propertyName, float value);
member this.WriteNumber : ReadOnlySpan<char> * single -> unit
Public Sub WriteNumber (propertyName As ReadOnlySpan(Of Char), value As Single)

参数

propertyName
ReadOnlySpan<Char>

要进行转码并写为 UTF-8 的 JSON 对象的 UTF-16 编码属性名称。

value
Single

要以 JSON 数字形式作为名称/值对的一部分编写的值。

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

注解

Single使用默认StandardFormat (即 .NET Core 3.0 或更高版本上的“G”) 写入 。 在任何其他框架上使用“G9”。

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

适用于

WriteNumber(ReadOnlySpan<Byte>, UInt64)

Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteProperties.UnsignedNumber.cs

重要

此 API 不符合 CLS。

编写指定为字节只读范围的属性名称和 UInt64 值(写为 JSON 数字)作为 JSON 对象的名称/值对的一部分。

public:
 void WriteNumber(ReadOnlySpan<System::Byte> utf8PropertyName, System::UInt64 value);
[System.CLSCompliant(false)]
public void WriteNumber (ReadOnlySpan<byte> utf8PropertyName, ulong value);
[<System.CLSCompliant(false)>]
member this.WriteNumber : ReadOnlySpan<byte> * uint64 -> unit
Public Sub WriteNumber (utf8PropertyName As ReadOnlySpan(Of Byte), value As ULong)

参数

utf8PropertyName
ReadOnlySpan<Byte>

要编写的 JSON 对象的 UTF-8 编码属性名称。

value
UInt64

要以 JSON 数字形式作为名称/值对的一部分编写的值。

属性

例外

指定的属性名称过长。

系统已启用验证,该编写操作将生成无效的 JSON。

注解

UInt64使用默认StandardFormat (“G”) 写入 ,例如 32767。

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

适用于