JsonBooleanNode class
Represents a JSON boolean node (true or false) in the Dart JSON model.
This node wraps a bool value and provides type-checking consistent with JsonNode.
Usage Example
final boolNode = JsonBooleanNode(true);
if (boolNode.isBoolean()) {
print(boolNode.toObject()); // true
}
Behavior Overview
| Dart JSON Value | Internal Representation | Description |
|---|---|---|
true |
value = true |
Boolean true |
false |
value = false |
Boolean false |
Design Notes
Constructors
- JsonBooleanNode(bool value)
-
Represents a JSON boolean node (
trueorfalse) in the Dart JSON model.
Properties
Methods
-
isArray(
) → bool -
Returns
trueif this node represents a JSON array ([...]).override -
isBoolean(
) → bool -
Returns
trueif this node represents a JSON boolean (trueorfalse).override -
isNull(
) → bool -
Returns
trueif this node represents a JSONnull.override -
isNumber(
) → bool -
Returns
trueif this node represents a JSON number.override -
isObject(
) → bool -
Returns
trueif this node represents a JSON object ({...}).override -
isTextual(
) → bool -
Returns
trueif this node represents a JSON string.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toObject(
) → bool -
Generic interface representing a parsed node in JetLeaf's structured
data model (JSON/YAML/other).
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited