Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Deriving_Json

module Deriving_Json : sig..end

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

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 marshal the v of type ty to a JSON string.

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

from_string Json.t<ty> s safely unmarshal 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.


module type Json_min = sig..end
module type Json_min' = sig..end
module type Json_min'' = sig..end
module Defaults : functor (J : Json_min) -> 
  Jsonwith type a = J.a
module Defaults' : functor (J : Json_min') -> 
  Jsonwith type a = J.a
module Defaults'' : functor (J : Json_min'') -> 
  Jsonwith type a = J.a
module Json_char : Jsonwith type a = char
module Json_bool : Jsonwith type a = bool
module Json_unit : Jsonwith type a = unit
module Json_int : Jsonwith type a = int
module Json_int32 : Jsonwith type a = int32
module Json_int64 : Jsonwith type a = int64
module Json_nativeint : Jsonwith type a = nativeint
module Json_float : Jsonwith type a = float
module Json_string : Jsonwith type a = string
module Json_list : functor (A : Json) -> 
  Jsonwith type a = A.a list
module Json_ref : functor (A : Json) -> 
  Jsonwith type a = A.a ref
module Json_option : functor (A : Json) -> 
  Jsonwith type a = A.a option
module Json_array : functor (A : Json) -> 
  Jsonwith type a = A.a array