Jsont.JsonGeneric JSON values.
type 'a jsont := 'a tThe type for constructing JSON values from an OCaml value of type 'a. meta defaults to Meta.none.
type t = jsonSee Jsont.json.
copy_layout src ~dst copies the layout of src and sets it on dst using Meta.copy_ws.
zero j is a stub value of the sort value of j. The stub value is the “natural” zero: null, false, 0, empty string, empty array, empty object.
compare j0 j1 is a total order on JSON values:
Float.compare, this means NaN values are equal.Meta.t values are ignored.See Jsont.pp_json.
val null : unit consnull is Null (unit, meta).
option c constructs Some v values with c v and None ones with null.
val bool : bool consbool b is Bool (b, meta).
val number : float consnumber n is Number (n, meta).
val any_float : float consany_float v is number v if Float.is_finite v is true and string (Float.to_string v) otherwise. See Jsont.any_float.
val int32 : int32 consint32 is i as a JSON number.
val int64 : int64 consint64 i is i as a JSON number or a JSON string if not in the range [-253;253]. See also int64_as_string.
val int : int consint is i as a JSON number or a JSON string if not in the range [-253;253]. See also int_as_string.
val string : string consstring s is String (s, meta).
find_mem n ms find the first member whose name matches n in ms.
val object_names : object' -> string listobject_names ms are the names of ms.
decode t j decodes a value from the generic JSON j according to type t.
decode' is like decode but preserves the error structure.
encode t v encodes a generic JSON value for v according to type t.
encode' is like encode but preserves the error structure.
recode t v decodes v with t and encodes it with t.
recode' is like recode but preserves the error structure.
update is like recode but raises Jsont.Error.
error_sort ~exp fnd errors when sort exp was expected but generic JSON fnd was found.