Module Deriving_Json
Typesafe IO (based on the deriving library).
- see https://github.com/ocsigen/deriving
the source code of deriving
- see http://code.google.com/p/deriving/
the documentation of the original deriving library by Jeremy Yallop.
val make : (Stdlib.Buffer.t -> 'a -> unit) -> (Deriving_Json_lexer.lexbuf -> 'a) -> 'a tval write : 'a t -> Stdlib.Buffer.t -> 'a -> unitval read : 'a t -> Deriving_Json_lexer.lexbuf -> 'aval to_string : 'a t -> 'a -> stringto_string Json.t<ty> vmarshal thevof typetyto a JSON string.
val from_string : 'a t -> string -> 'afrom_string Json.t<ty> ssafely unmarshal the JSONsinto an OCaml value of typety. ThrowsFailureif the received value isn't the javascript representation of a value of typety.
module type Json = sig ... endThe signature of the JSON class.
module type Json_min = sig ... endmodule type Json_min' = sig ... endmodule type Json_min'' = sig ... endmodule Defaults'' : functor (J : Json_min'') -> Json with type a = J.amodule Json_int32 : Json with type a = int32module Json_int64 : Json with type a = int64module Json_nativeint : Json with type a = nativeintmodule Json_float : Json with type a = floatmodule Json_string : Json with type a = stringval read_list : (Deriving_Json_lexer.lexbuf -> 'a) -> Deriving_Json_lexer.lexbuf -> 'a listval write_list : (Stdlib.Buffer.t -> 'a -> unit) -> Stdlib.Buffer.t -> 'a list -> unitval read_ref : (Deriving_Json_lexer.lexbuf -> 'a) -> Deriving_Json_lexer.lexbuf -> 'a Stdlib.refval write_ref : (Stdlib.Buffer.t -> 'a -> unit) -> Stdlib.Buffer.t -> 'a Stdlib.ref -> unitval read_option : (Deriving_Json_lexer.lexbuf -> 'a) -> Deriving_Json_lexer.lexbuf -> 'a optionval write_option : (Stdlib.Buffer.t -> 'a -> unit) -> Stdlib.Buffer.t -> 'a option -> unitval read_array : (Deriving_Json_lexer.lexbuf -> 'a) -> Deriving_Json_lexer.lexbuf -> 'a arrayval write_array : (Stdlib.Buffer.t -> 'a -> unit) -> Stdlib.Buffer.t -> 'a array -> unit