package jsont

  1. Overview
  2. Docs

JSON error contexts.

type index = string node * Path.index

The type for context indices. The kinded sort of an array or object and its index.

type t = index list

The type for erroring contexts. The first element indexes the root JSON value.

val empty : t

empty is the empty context.

val is_empty : t -> bool

is_empty ctx is true iff ctx is empty.

val push_array : string node -> int node -> t -> t

push_array kinded_sort n ctx wraps ctx as the nth element of an array of kinded sort kinded_sort.

val push_object : string node -> string node -> t -> t

push_object kinded_sort n ctx wraps ctx as the member named n of an object of kinded sort kinded_sort.

OCaml

Innovation. Community. Security.