# Module Deriving_Json

    module Deriving_Json: sig .. end

Typesafe IO (based on the deriving-ocsigen library).
See also

- the source code of deriving-ocsigen
- the documentation of the original deriving library by Jeremy Yallop.

    type 'a t

The type of JSON parser/printer for value of type `'a`.

    val to_string : 'a t -> 'a -> string

`to_string Json.t<ty> v` marshall the `v` of type `ty` to a JSON string.

    val from_string : 'a t -> string -> 'a

`from_string Json.t<ty> s` safely unmarshall the JSON `s` into an OCaml value of type `ty`. Throws `Failure` if the received value isn't the javascript representation of a value of type `ty`.

    module type Json = sig .. end

The signature of the JSON class.