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) booleanintgetDepth()getKey()JsonPath[]Returns the elements in this path's parent chain in order from ROOT downwardsprotected StringgetSubPath(int startingDepth) inthashCode()booleanisAncestorOf(JsonPath element) booleanisRelatedTo(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 pathbooleanisRoot()static booleanisValidIdentifier(String test) static JsonPathtoString()
-
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
-