JsonValue   Conversion (JsonValue to NullableBoolean)

Performs an explicit conversion from JsonValue to nullable bool. The conversion succeeds if the Type property is Null or Boolean; otherwise, an InvalidCastException is thrown.

Definition

Namespace: KGySoft.Json
Assembly: KGySoft.Json (in KGySoft.Json.dll) Version: 3.0.0
C#
public static explicit operator bool? (
	JsonValue value
)

Parameters

value  JsonValue
The value to be converted to a bool.

Return Value

NullableBoolean
A bool instance that represents the original value.

Exceptions

InvalidCastExceptionvalue does not represent a boolean value.

See Also