public class JsonPointer
extends java.lang.Object
TreeNode.at(com.fasterxml.jackson.core.JsonPointer)).
It may be used in future for filtering of streaming JSON content
as well (not implemented yet for 2.3).
Instances are fully immutable and can be shared, cached.
| Type | Property and Description |
|---|---|
boolean |
mayMatch |
| Modifier and Type | Method and Description |
|---|---|
JsonPointer |
append(JsonPointer tail) |
static JsonPointer |
compile(java.lang.String input)
Factory method that parses given input and construct matching pointer
instance, if it represents a valid JSON Pointer: if not, a
IllegalArgumentException is thrown. |
boolean |
equals(java.lang.Object o) |
int |
getMatchingIndex() |
java.lang.String |
getMatchingProperty() |
int |
hashCode() |
JsonPointer |
head()
Accessor for getting a pointer instance that is identical to this
instance except that the last segment has been dropped.
|
JsonPointer |
last()
Returns the leaf of current JSON Pointer expression.
|
JsonPointer |
matchElement(int index) |
boolean |
matches() |
boolean |
matchesElement(int index)
Method that may be called to see if the pointer would match
array element (of a JSON Array) with given index.
|
boolean |
matchesProperty(java.lang.String name)
Method that may be called to see if the pointer would match property
(of a JSON Object) with given name.
|
JsonPointer |
matchProperty(java.lang.String name) |
boolean |
mayMatchElement() |
boolean |
mayMatchProperty() |
JsonPointer |
tail()
Accessor for getting a "sub-pointer", instance where current segment
has been removed and pointer includes rest of segments.
|
java.lang.String |
toString() |
static JsonPointer |
valueOf(java.lang.String input)
Alias for
compile(java.lang.String); added to make instances automatically
deserializable by Jackson databind. |
public static JsonPointer compile(java.lang.String input) throws java.lang.IllegalArgumentException
IllegalArgumentException is thrown.java.lang.IllegalArgumentException - Thrown if the input does not present a valid JSON Pointer
expression: currently the only such expression is one that does NOT start with
a slash ('/').public static JsonPointer valueOf(java.lang.String input)
compile(java.lang.String); added to make instances automatically
deserializable by Jackson databind.public boolean matches()
public java.lang.String getMatchingProperty()
public int getMatchingIndex()
public boolean mayMatchProperty()
public boolean mayMatchElement()
public JsonPointer last()
public JsonPointer append(JsonPointer tail)
public boolean matchesProperty(java.lang.String name)
public JsonPointer matchProperty(java.lang.String name)
public boolean matchesElement(int index)
public JsonPointer matchElement(int index)
public JsonPointer tail()
public JsonPointer head()
tail() that
would return "/branch/leaf").
For leafpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"