JsonValueCreateLiteralUnchecked Method

Creates a JsonValue that forcibly treats value as a JSON literal, even if it is invalid in JSON.


Namespace: KGySoft.Json
Assembly: KGySoft.Json (in KGySoft.Json.dll) Version: 3.0.0
public static JsonValue CreateLiteralUnchecked(
	string value


value  String
The value.

Return Value

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



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