com.github.fge.jackson.jsonpointer
Class JsonNodeResolver
java.lang.Object
com.github.fge.jackson.jsonpointer.TokenResolver<JsonNode>
com.github.fge.jackson.jsonpointer.JsonNodeResolver
@Immutable
public final class JsonNodeResolver
- extends TokenResolver<JsonNode>
Implementation of TokenResolver
for JsonNode
The JSON Pointer specification specifies that for arrays, indices must
not have leading zeroes (save for 0
itself). This class handles
this.
JsonNodeResolver
public JsonNodeResolver(ReferenceToken token)
get
public JsonNode get(JsonNode node)
- Description copied from class:
TokenResolver
- Advance one level into the tree
Note: it is required that this method return null on
traversal failure.
Note 2: handling null
itself is up to implementations.
- Specified by:
get
in class TokenResolver<JsonNode>
- Parameters:
node
- the node to traverse
- Returns:
- the other node, or
null
if no such node exists for that
token