Node<T extends Object?> class

A JSON document node.

Constructors

Node(T value)
Creates an instance of the root node of the JSON document value.

Properties

children Iterable<Node<Object?>>
All direct children of the node.
no setter
hashCode int
The hash code for this object.
no setteroverride
index int?
For a node which is an element of an array, this is its index in the parent node.
final
key String?
For a node which is an object child, this is its key in the parent node.
final
parent Node<Object?>?
The parent node.
final
root Node<Object?>
The root node of the entire document.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T
The node value.
final

Methods

child(String key) Node<Object?>?
Returns the JSON object child at the key if it exists, otherwise returns null.
element(int offset) Node<Object?>?
Returns the JSON array element at the offset if it exists, otherwise returns null. Negative offsets are supported.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
slice({int? start, int? stop, int? step}) Iterable<Node<Object?>>?
For a node whose value is an array, returns the slice of its children.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override