JsonNullNode class

Represents a JSON null node (null) in the Dart JSON model.

This node indicates the absence of a value and behaves consistently with JsonNode type-checking methods.

Usage Example

final nullNode = JsonNullNode();

if (nullNode.isNull()) {
  print(nullNode.toObject()); // null
}

Behavior Overview

Dart JSON Value Internal Representation Description
null JsonNullNode() Represents a null value

Design Notes

  • This class is immutable and uses a const constructor.
  • toObject returns Dart null.
  • Type-checking is consistent with JsonNode interface.
Implemented types

Constructors

JsonNullNode()
Represents a JSON null node (null) in the Dart JSON model.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

isArray() → bool
Returns true if this node represents a JSON array ([...]).
override
isBoolean() → bool
Returns true if this node represents a JSON boolean (true or false).
override
isNull() → bool
Returns true if this node represents a JSON null.
override
isNumber() → bool
Returns true if this node represents a JSON number.
override
isObject() → bool
Returns true if this node represents a JSON object ({...}).
override
isTextual() → bool
Returns true if this node represents a JSON string.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toObject() → Object
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