JsonValueCreateNumberUnchecked Method

KGy SOFT JSON Libraries Help
Creates a JsonValue that forcibly treats value as a JSON number, even if it cannot be represented as a valid number in JavaScript.
See the Remarks section for details.

Namespace:  KGySoft.Json
Assembly:  KGySoft.Json (in KGySoft.Json.dll) Version: 2.0.1

public static JsonValue CreateNumberUnchecked(
	string value


Type: SystemString
The value.

Return Value

Type: JsonValue
Null, if value was ; otherwise, a JsonValue that contains the specified value as a Number.

Caution note Caution
This method makes possible to create invalid JSON.

The Type property of the result will return Number even if value is not a valid number.

The AsLiteral property will return the specified value.

The AsNumber property of the result may return a less precise value, or even , though serializing to JSON by the ToString and WriteTo methods preserves the specified value.

See Also