Util.Json.JsonPath
case JsonPath(List[JsonStep])A path locating a value inside a Json document, as a sequence of
JsonSteps.
The List[JsonStep] is stored head-at-root: the first element is the
outermost step and the last element is the leaf. Walking head-to-tail
yields the natural root-to-leaf order used by toJsonPointer.
Definitions
Prepends s to p. O(1).
This is the decode-side primitive: as a decode error bubbles up, each
outer wrapper conses its own step, leaving the head as the outermost
(root) step.
Parses a JSON Pointer (RFC 6901) into a JsonPath.
Returns None if s is non-empty and does not start with /, or if a
reference token contains an invalid ~ escape.
All-digit segments without leading zeros (or the lone segment "0")
classify as Index; everything else classifies as Key. This is a
heuristic — round-tripping a Key("123") through toJsonPointer then
fromJsonPointer yields Index(123).
Returns a path with the given steps in root-to-leaf order.
Appends s to p. O(n).
This is the navigation-side primitive: when constructing a path forward from the root, each new step extends the leaf end.