package jsont

  1. Overview
  2. Docs

Module Error.ContextSource

JSON error contexts.

Sourcetype index = string node * Path.index

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

Sourcetype t = index list

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

Sourceval empty : t

empty is the empty context.

Sourceval is_empty : t -> bool

is_empty ctx is true iff ctx is empty.

Sourceval 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.

Sourceval 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.