Module Jsont.Context

JSON encoding and decoding contexts.

type t

The type for JSON encoding or decoding contexts.

val make : Path.t -> t

make path the context at path.

val root : t

root is the toplevel context.

val path : t -> Path.t

path is the JSON path of the context.

val is_root : t -> bool

is_top c is true iff path c = [].

val push_nth : int node -> t -> t

push_nth n is a context for the nth element of an array.

val push_mem : string node -> t -> t

push_mem n is a context for the member named n of an object.