Module djson.jsonpath
JSONPath (RFC 9535) support: expression compiler and queries over a JValue tree.
The same compiler is used by JValue and by walkJSON; get, set and the
other path-based methods keep using JSON Pointers. It also accepts
JSON Pointers (expressions starting with /), with the same rules as JValue.
Supported syntax: $, , ['name'], [n] (negative counts from the end),
[*], , descendants (..name, ..*, ..[n]), unions (['a','b'], [0,2])
and slices ([1:5], [::-1]). Filter expressions ([?...]) are not supported.
Functions
| Name | Description |
|---|---|
pathToString(path)
|
Formats a node path as a normalized JSONPath (RFC 9535), e.g. $['coordinates'][3]['x'].
|
Structs
| Name | Description |
|---|---|
JSONPathResult
|
Nodes selected by JValue, in JSONPath result order.
|
PathItem
|
One step of the path from the root to a node. |