Class JsonPath
- java.lang.Object
- 
- com.inductiveautomation.ignition.common.JsonPath
 
- 
- All Implemented Interfaces:
- java.io.Serializable
 
 public class JsonPath extends java.lang.Object implements java.io.SerializableA property path represents a location in a JSON document. For example: foo.bar[5].bazImplemented as a singly-linked list where each PropertyPath represents one part of the path, linked to its parent. - See Also:
- Serialized Form
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonPathcreateChildPath(int index)JsonPathcreateChildPath(JsonPath subElement)For creating subpaths, will return a cloned element with this as the new parent.JsonPathcreateChildPath(java.lang.String childKey)booleanequals(java.lang.Object obj)java.util.LinkedList<JsonPath>getAsLinkedList()intgetDepth()java.lang.ObjectgetKey()JsonPathgetParent()JsonPath[]getPathElements()Returns the elements in this path's parent chain in order from ROOT downwardsprotected java.lang.StringgetStringPathPart()JsonPathgetSubPath(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(java.lang.String test)static JsonPathparse(java.lang.String path)java.lang.StringtoString()
 
- 
- 
- 
Field Detail- 
ROOTpublic static final JsonPath 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 Detail- 
isRootpublic boolean isRoot() 
 - 
getDepthpublic int getDepth() 
 - 
getKeypublic java.lang.Object getKey() 
 - 
getStringPathPartprotected java.lang.String getStringPathPart() 
 - 
getParentpublic JsonPath getParent() 
 - 
getPathElementspublic JsonPath[] getPathElements() Returns the elements in this path's parent chain in order from ROOT downwards
 - 
getAsLinkedListpublic java.util.LinkedList<JsonPath> getAsLinkedList() 
 - 
getSubPathpublic JsonPath getSubPath(int startingDepth) 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
isAncestorOfpublic boolean isAncestorOf(JsonPath element) 
 - 
isRelatedTopublic 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 path
 
 - 
isValidIdentifierpublic static boolean isValidIdentifier(java.lang.String test) 
 - 
createChildPathpublic JsonPath createChildPath(java.lang.String childKey) 
 - 
createChildPathpublic JsonPath createChildPath(int index) 
 - 
createChildPathpublic JsonPath createChildPath(JsonPath subElement) For creating subpaths, will return a cloned element with this as the new parent.
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
parsepublic static JsonPath parse(java.lang.String path) 
 
- 
 
-