module Json_type:OCaml representation of JSON datasig
..end
type
json_type =
| |
Object of |
| |
Array of |
| |
String of |
| |
Int of |
| |
Float of |
| |
Bool of |
| |
Null |
json_type
is a boolean, integer, real, string, null. It can
also be lists Array
or string-keyed maps Object
of
json_type
's. The JSON payload can only be an Object
or Array
.
This type is used by the parsing and printing functions from the
Json_io
module. Typically, a program would convert such data into
a specialized type that uses records, etc. For the purpose of converting
from and to other types, two submodules are provided: Json_type.Browse
and Json_type.Build
.
They are meant to be opened using either open Json_type.Browse
or open Json_type.Build
. They provided simple functions for converting
JSON data.
typet =
json_type
t
is an alias for json_type
.exception Json_error of string
Json_error
exception.
Other exceptions may be raised when calling functions from the library.
Either they come from
the failure of external functions or like Not_found
they
are not errors per se, and are specifically documented.
module Browse:sig
..end
module Build:sig
..end