JsonPath
A structure representing the location of an item in a JSON object or JSON array, potentially nested in other JSON objects and JSON arrays.
To create a basic JsonPath you can call the JsonPath factory methods JsonPath.key and JsonPath.index depending on where you want to start the path from: the first one would start from a JSON object, the second would start from a JSON array.
val objectPath = JsonPath.key("container")
val arrayPath = JsonPath.index(0)To create a path like container.array[0].property you can use a subscript for each path component:
JsonPath.key("container")
.key("array")
.index(0)
.key("property")
// or for Kotlin users only
JsonPath["container"]["array"][0]["property"]Kotlin users can make use of the more expressive syntax through the get operator functions for easy readability
val objectPath = JsonPath["container"]
val arrayPath = JsonPath[0]Types
DataItemConverter to create JsonPath instances from their String representations.
Functions
Should return an instance of a DataItem that represents all required properties of the implementing class, such that it could be:
Utility method to cast a JsonPath of unknown type, e.g. from a JsonPath.parse to the required type.
Utility method to cast a JsonPath of unknown type, e.g. from a JsonPath.parse to the required type.
Utility method to cast a JsonPath of unknown type, e.g. from a JsonPath.parse to the required type.
Utility method to cast a JsonPath of unknown type, e.g. from a JsonPath.parse to the required type.