-
- All Known Implementing Classes:
JacksonNode
interface NodeA node representing a JSON structure. This class is a Pioneer abstraction which allows using different JSON parsers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.stream.Stream<Node>elements()java.util.Optional<Node>getNode(java.lang.String name)Get the node value with the given name.booleanisArray()<T> TtoType(java.lang.reflect.Type type)Convert this node into the requestedtypejava.lang.Objectvalue(java.lang.reflect.Type typeHint)Get the value of the node.
-
-
-
Method Detail
-
isArray
boolean isArray()
- Returns:
trueif the node represents an array of other nodes
-
elements
java.util.stream.Stream<Node> elements()
- Returns:
- all the elements of this potential array node
-
toType
<T> T toType(java.lang.reflect.Type type)
Convert this node into the requestedtype- Type Parameters:
T- the type- Parameters:
type- the type into which this node needs to be converted- Returns:
- the converted type
-
getNode
java.util.Optional<Node> getNode(java.lang.String name)
Get the node value with the given name.- Parameters:
name- the name of the node- Returns:
- the node for the given name
-
value
java.lang.Object value(java.lang.reflect.Type typeHint)
Get the value of the node.- Parameters:
typeHint- the potential type of the value- Returns:
- the node value
-
-