com.github.fge.jackson.jsonpointer
Class JsonNodeResolver

java.lang.Object
  extended by com.github.fge.jackson.jsonpointer.TokenResolver<JsonNode>
      extended by 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.


Field Summary
 
Fields inherited from class com.github.fge.jackson.jsonpointer.TokenResolver
token
 
Constructor Summary
JsonNodeResolver(ReferenceToken token)
           
 
Method Summary
 JsonNode get(JsonNode node)
          Advance one level into the tree
 
Methods inherited from class com.github.fge.jackson.jsonpointer.TokenResolver
equals, getToken, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsonNodeResolver

public JsonNodeResolver(ReferenceToken token)
Method Detail

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