nox-jsonptr#
The JSON Pointer string syntax (RFC 6901): token escaping (~0/~1),
pointer splitting, and array-index parsing. Value-type independent —
document cursors (JSON, YAML) layer their own traversal on top.
Installation#
Install with opam:
$ opam install nox-jsonptr
If opam cannot find the package, it may not yet be released in the public
opam-repository. Add the overlay repository, then install it:
$ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git
$ opam update
$ opam install nox-jsonptr
Usage#
# Jsonptr.tokens "/a~1b/0";;
- : string list option = Some ["a/b"; "0"]
# Jsonptr.encode_token "m~n";;
- : string = "m~0n"
# Jsonptr.decode_index "01";;
- : int option = None
License#
ISC.