package data-encoding
Module Data_encoding.JsonSource
type json = [ | `O of (string * json) list| `Bool of bool| `Float of float| `A of json list| `Null| `String of string
]In memory JSON data, compatible with Ezjsonm.
Encodes raw JSON data (BSON is used for binary).
Encodes a JSON schema (BSON encoded for binary).
Create a Json_encoding.encoding from an encoding.
Generate a schema from an encoding.
Construct a JSON object from an encoding.
Destruct a JSON object into a value. Fail with an exception if the JSON object and encoding do not match..
JSON Error.
and path_item = [ | `Field of string(*A field in an object.
*)| `Index of int(*An index in an array.
*)| `Star(*Any / every field or index.
*)| `Next(*The next element after an array.
*)
]A set of accessors that point to a location in a JSON object.
Exception raised by destructors, with the location in the original JSON structure and the specific error.
Unexpected kind of data encountered, with the expectation.
Array of unexpected size encountered, with the expectation.
Missing field in an object.
Supernumerary field in an object.
val print_error :
?print_unknown:(Format.formatter -> exn -> unit) ->
Format.formatter ->
exn ->
unitHelpers for writing encoders.
Write a JSON document to a string. This goes via an intermediate buffer and so may be slow on large documents.