package js_of_ocaml

  1. Overview
  2. Docs
Compiler from OCaml bytecode to JavaScript

Install

Dune Dependency

Authors

Maintainers

Sources

js_of_ocaml-5.6.0.tbz
sha256=8435f02633a17ef6c8a1a3171a6537fdb206c00c4fb7d4ca54250df6daf6c23f
sha512=a9556ec69a90ea8ff9b6ea1ab983815e39f6703c7da6df24524e023d76fb04790ffed8666a2671f42c31bca15013a4238ae98a8c1c35d90fabdf9993565a1d99

doc/js_of_ocaml.deriving/Deriving_Json/index.html

Module Deriving_JsonSource

Typesafe IO (based on the deriving library).

Sourcetype 'a t

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

Sourceval make : (Buffer.t -> 'a -> unit) -> (Deriving_Json_lexer.lexbuf -> 'a) -> 'a t
Sourceval write : 'a t -> Buffer.t -> 'a -> unit
Sourceval read : 'a t -> Deriving_Json_lexer.lexbuf -> 'a
Sourceval to_string : 'a t -> 'a -> string

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

Sourceval 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.

Sourcemodule type Json = sig ... end

The signature of the JSON class.

Deriver

Sourcemodule type Json_min = sig ... end
Sourcemodule type Json_min' = sig ... end
Sourcemodule type Json_min'' = sig ... end
Sourcemodule Defaults (J : Json_min) : Json with type a = J.a
Sourcemodule Defaults' (J : Json_min') : Json with type a = J.a
Sourcemodule Defaults'' (J : Json_min'') : Json with type a = J.a
Sourcemodule Json_char : Json with type a = char
Sourcemodule Json_bool : Json with type a = bool
Sourcemodule Json_unit : Json with type a = unit
Sourcemodule Json_int : Json with type a = int
Sourcemodule Json_int32 : Json with type a = int32
Sourcemodule Json_int64 : Json with type a = int64
Sourcemodule Json_nativeint : Json with type a = nativeint
Sourcemodule Json_float : Json with type a = float
Sourcemodule Json_string : Json with type a = string
Sourcemodule Json_list (A : Json) : Json with type a = A.a list
Sourcemodule Json_ref (A : Json) : Json with type a = A.a ref
Sourcemodule Json_option (A : Json) : Json with type a = A.a option
Sourcemodule Json_array (A : Json) : Json with type a = A.a array
Sourceval read_list : (Deriving_Json_lexer.lexbuf -> 'a) -> Deriving_Json_lexer.lexbuf -> 'a list
Sourceval write_list : (Buffer.t -> 'a -> unit) -> Buffer.t -> 'a list -> unit
Sourceval write_ref : (Buffer.t -> 'a -> unit) -> Buffer.t -> 'a ref -> unit
Sourceval read_option : (Deriving_Json_lexer.lexbuf -> 'a) -> Deriving_Json_lexer.lexbuf -> 'a option
Sourceval write_option : (Buffer.t -> 'a -> unit) -> Buffer.t -> 'a option -> unit
Sourceval read_array : (Deriving_Json_lexer.lexbuf -> 'a) -> Deriving_Json_lexer.lexbuf -> 'a array
Sourceval write_array : (Buffer.t -> 'a -> unit) -> Buffer.t -> 'a array -> unit
OCaml

Innovation. Community. Security.