pp_trace formats paths as a stack trace, if not empty.
Path syntax
Path provide a way for end users to address JSON and edit locations.
A path is a sequence of member and list indexing operations. Applying the path to a JSON value leads to either a JSON value, or nothing if one of the indices does not exist, or an error if ones tries to index a non-indexable value.
ocaml.libs # value of member "libs" of member "ocaml"
ocaml.libs.[0] # first element of member "libs" of member "ocaml"
More formally a path is a . seperated list of indices. An index is written [i]. i can a zero-based list index. Or i can be an object member name n. If there is no ambiguity, the surrounding brackets can be dropped.
Notes.
The syntax has no form of quoting at the moment this means key names can't contain, [, ], or start with a number.
It would be nice to be able to drop the dots in order to be compatible with JSONPath syntax.
Reintroduce and implement negative indices (they are parsed).