# Module Json_type

    module Json_type: sig .. end

OCaml representation of JSON data

    type json_type =

`|` | `Object of `(string * json_type) list``
`|` | `Array of `json_type list``
`|` | `String of `string``
`|` | `Int of `int``
`|` | `Float of `float``
`|` | `Bool of `bool``
`|` | `Null`

A `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.

    type t = json_type

`t` is an alias for `json_type`.

    exception Json_error of string

Errors that are produced by the json-wheel library are represented using the `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

This submodule provides some simple functions for checking and reading the structure of JSON data.

    module Build: sig .. end

This submodule provides some simple functions for building JSON data from other OCaml types.