java.lang.Object
io.helidon.json.JsonValue
io.helidon.json.JsonBoolean
Represents a JSON boolean value (true or false).
This module is incubating. These APIs may change in any version of Helidon, including backward incompatible changes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonBooleanThe singleton instance representing the JSON boolean value false.static final JsonBooleanThe singleton instance representing the JSON boolean value true. -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonBooleancreate(boolean value) Create a JsonBoolean from a boolean value.voidtoJson(JsonGenerator generator) Write this JSON value to the provided generator.type()Return the type of this JSON value.booleanvalue()Return the boolean value of this JsonBoolean.
-
Field Details
-
FALSE
The singleton instance representing the JSON boolean value false. -
TRUE
The singleton instance representing the JSON boolean value true.
-
-
Method Details
-
create
Create a JsonBoolean from a boolean value.Return the appropriate singleton instance (TRUE or FALSE) for efficiency.
- Parameters:
value- the boolean value- Returns:
- the JsonBoolean instance
-
value
public boolean value()Return the boolean value of this JsonBoolean.- Returns:
- the boolean value
-
type
Description copied from class:JsonValueReturn the type of this JSON value. -
toJson
Description copied from class:JsonValueWrite this JSON value to the provided generator.
-