Editare

Partajați prin


Utf8JsonWriter.WriteNumberValue Method

Definition

Overloads

WriteNumberValue(UInt64)

Writes a UInt64 value (as a JSON number) as an element of a JSON array.

WriteNumberValue(UInt32)

Writes a UInt32 value (as a JSON number) as an element of a JSON array.

WriteNumberValue(Single)

Writes a Single value (as a JSON number) as an element of a JSON array.

WriteNumberValue(Int64)

Writes an Int64 value (as a JSON number) as an element of a JSON array.

WriteNumberValue(Int32)

Writes an Int32 value (as a JSON number) as an element of a JSON array.

WriteNumberValue(Double)

Writes a Double value (as a JSON number) as an element of a JSON array.

WriteNumberValue(Decimal)

Writes a Decimal value (as a JSON number) as an element of a JSON array.

WriteNumberValue(UInt64)

Source:
Utf8JsonWriter.WriteValues.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteValues.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteValues.UnsignedNumber.cs

Important

This API is not CLS-compliant.

Writes a UInt64 value (as a JSON number) as an element of a JSON array.

public:
 void WriteNumberValue(System::UInt64 value);
[System.CLSCompliant(false)]
public void WriteNumberValue (ulong value);
[<System.CLSCompliant(false)>]
member this.WriteNumberValue : uint64 -> unit
Public Sub WriteNumberValue (value As ULong)

Parameters

value
UInt64

The value to be written as a JSON number as an element of a JSON array.

Attributes

Exceptions

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

Remarks

This method writes the UInt64 value using the default StandardFormat (that is, 'G'). For example, 32767.

Applies to

WriteNumberValue(UInt32)

Source:
Utf8JsonWriter.WriteValues.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteValues.UnsignedNumber.cs
Source:
Utf8JsonWriter.WriteValues.UnsignedNumber.cs

Important

This API is not CLS-compliant.

Writes a UInt32 value (as a JSON number) as an element of a JSON array.

public:
 void WriteNumberValue(System::UInt32 value);
[System.CLSCompliant(false)]
public void WriteNumberValue (uint value);
[<System.CLSCompliant(false)>]
member this.WriteNumberValue : uint32 -> unit
Public Sub WriteNumberValue (value As UInteger)

Parameters

value
UInt32

The value to be written as a JSON number as an element of a JSON array.

Attributes

Exceptions

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

Remarks

This method writes the UInt32 value using the default StandardFormat (that is, 'G'). For example, 32767.

Applies to

WriteNumberValue(Single)

Source:
Utf8JsonWriter.WriteValues.Float.cs
Source:
Utf8JsonWriter.WriteValues.Float.cs
Source:
Utf8JsonWriter.WriteValues.Float.cs

Writes a Single value (as a JSON number) as an element of a JSON array.

public:
 void WriteNumberValue(float value);
public void WriteNumberValue (float value);
member this.WriteNumberValue : single -> unit
Public Sub WriteNumberValue (value As Single)

Parameters

value
Single

The value to be written as a JSON number as an element of a JSON array.

Exceptions

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

Remarks

This method writes the Single value using the default StandardFormat (that is, 'G') on .NET Core 3.0 or later versions. Uses 'G9' on any other framework.

Applies to

WriteNumberValue(Int64)

Source:
Utf8JsonWriter.WriteValues.SignedNumber.cs
Source:
Utf8JsonWriter.WriteValues.SignedNumber.cs
Source:
Utf8JsonWriter.WriteValues.SignedNumber.cs

Writes an Int64 value (as a JSON number) as an element of a JSON array.

public:
 void WriteNumberValue(long value);
public void WriteNumberValue (long value);
member this.WriteNumberValue : int64 -> unit
Public Sub WriteNumberValue (value As Long)

Parameters

value
Int64

The value to be written as a JSON number as an element of a JSON array.

Exceptions

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

Remarks

This method writes the Int64 value using the default StandardFormat (that is, 'G'). For example, 32767.

Applies to

WriteNumberValue(Int32)

Source:
Utf8JsonWriter.WriteValues.SignedNumber.cs
Source:
Utf8JsonWriter.WriteValues.SignedNumber.cs
Source:
Utf8JsonWriter.WriteValues.SignedNumber.cs

Writes an Int32 value (as a JSON number) as an element of a JSON array.

public:
 void WriteNumberValue(int value);
public void WriteNumberValue (int value);
member this.WriteNumberValue : int -> unit
Public Sub WriteNumberValue (value As Integer)

Parameters

value
Int32

The value to be written as a JSON number as an element of a JSON array.

Exceptions

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

Remarks

This method writes the Int32 value using the default StandardFormat (that is, 'G'). For example, 32767.

Applies to

WriteNumberValue(Double)

Source:
Utf8JsonWriter.WriteValues.Double.cs
Source:
Utf8JsonWriter.WriteValues.Double.cs
Source:
Utf8JsonWriter.WriteValues.Double.cs

Writes a Double value (as a JSON number) as an element of a JSON array.

public:
 void WriteNumberValue(double value);
public void WriteNumberValue (double value);
member this.WriteNumberValue : double -> unit
Public Sub WriteNumberValue (value As Double)

Parameters

value
Double

The value to be written as a JSON number as an element of a JSON array.

Exceptions

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

Remarks

This method writes the Double value using the default StandardFormat (that is, 'G') on .NET Core 3.0 or later versions. Uses 'G17' on any other framework.

Applies to

WriteNumberValue(Decimal)

Source:
Utf8JsonWriter.WriteValues.Decimal.cs
Source:
Utf8JsonWriter.WriteValues.Decimal.cs
Source:
Utf8JsonWriter.WriteValues.Decimal.cs

Writes a Decimal value (as a JSON number) as an element of a JSON array.

public:
 void WriteNumberValue(System::Decimal value);
public void WriteNumberValue (decimal value);
member this.WriteNumberValue : decimal -> unit
Public Sub WriteNumberValue (value As Decimal)

Parameters

value
Decimal

The value to be written as a JSON number as an element of a JSON array.

Exceptions

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

Remarks

This method writes the Decimal value using the default StandardFormat (that is, 'G').

Applies to