Package com.oorian.json
Class JsonBoolean
java.lang.Object
com.oorian.json.JsonValue
com.oorian.json.JsonBoolean
Represents a JSON boolean value (
true or false).
JsonBoolean wraps a Java Boolean and provides JSON serialization
that outputs the JSON literals true or false.
-
Constructor Summary
ConstructorsConstructorDescriptionJsonBoolean(Boolean value) Creates a new JsonBoolean with the specified value. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the underlying boolean value.Returns this value serialized as a JSON string.
-
Constructor Details
-
JsonBoolean
Creates a new JsonBoolean with the specified value.- Parameters:
value- the boolean value.
-
-
Method Details
-
getValue
Returns the underlying boolean value.- Returns:
- the Boolean value.
-
toJsonString
Description copied from class:JsonValueReturns this value serialized as a JSON string.- Specified by:
toJsonStringin classJsonValue- Returns:
- the JSON string representation.
-