Class JsonPath
java.lang.Object
com.inductiveautomation.ignition.common.JsonPath
- All Implemented Interfaces:
Serializable
A property path represents a location in a JSON document. For example: foo.bar[5].baz
Implemented as a singly-linked list where each PropertyPath represents one part of the path, linked to its parent.
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateChildPath
(int index) createChildPath
(JsonPath subElement) For creating subpaths, will return a cloned element with this as the new parent.createChildPath
(String childKey) boolean
int
getDepth()
getKey()
JsonPath[]
Returns the elements in this path's parent chain in order from ROOT downwardsprotected String
getSubPath
(int startingDepth) int
hashCode()
boolean
isAncestorOf
(JsonPath element) boolean
isRelatedTo
(JsonPath other) Returns true if any of the following are true: This path is equal to the given path This path is an ancestor of the given path The given path is an ancestor of this pathboolean
isRoot()
static boolean
isValidIdentifier
(String test) static JsonPath
toString()
-
Field Details
-
ROOT
Special path which represents the root of all paths. Is the ancestor of any path except itself. For example, this would be the parent of the path "foo"
-
-
Method Details
-
isRoot
public boolean isRoot() -
getDepth
public int getDepth() -
getKey
-
getStringPathPart
-
getParent
-
getPathElements
Returns the elements in this path's parent chain in order from ROOT downwards -
getAsLinkedList
-
getSubPath
-
equals
-
hashCode
public int hashCode() -
isAncestorOf
-
isRelatedTo
Returns true if any of the following are true:- This path is equal to the given path
- This path is an ancestor of the given path
- The given path is an ancestor of this path
-
isValidIdentifier
-
createChildPath
-
createChildPath
-
createChildPath
For creating subpaths, will return a cloned element with this as the new parent. -
toString
-
parse
-