KGy SOFT

JsonValueCreateLiteralUnchecked Method

KGy SOFT JSON Libraries Help
Creates a JsonValue that forcibly treats value as a JSON literal, even if it is invalid in JSON.
See the Remarks section for details.

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

public static JsonValue CreateLiteralUnchecked(
	string value
)

Parameters

value
Type: SystemString
The value.

Return Value

Type: JsonValue
Null, if value was ; otherwise, a JsonValue, whose Type property returns UnknownLiteral.
Remarks

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

The Type property of the result will return UnknownLiteral even if value is actually a valid JSON literal.

The AsLiteral property will return the specified value.

Serializing to JSON by the ToString and WriteTo methods preserves the specified value.

See Also

Reference