package melange-json-native

  1. Overview
  2. Docs

Module Melange_jsonSource

The type of a JSON data structure

Sourcetype json = t

Defined for convenience.

Sourceval classify : Yojson.Basic.t -> [ `Assoc of (string * Yojson.Basic.t) list | `Bool of bool | `Float of float | `Int of int | `List of Yojson.Basic.t list | `Null | `String of string ]
Sourceval declassify : [ `Assoc of (string * Yojson.Basic.t) list | `Bool of bool | `Float of float | `Int of int | `List of Yojson.Basic.t list | `Null | `String of string ] -> Yojson.Basic.t
Sourceval to_string : Yojson.Basic.t -> string
Sourceexception Of_string_error of string
Sourcetype of_json_error =
  1. | Json_error of string
  2. | Unexpected_variant of string
Sourceexception Of_json_error of of_json_error
Sourceval with_buffer : ((string -> unit) -> 'a) -> string
Sourceval iteri_last : (is_last:bool -> int -> 'a -> unit) -> 'a list -> unit
Sourceval show_json_type : Yojson.Basic.t -> string
Sourceval show_json_error : ?depth:int -> ?width:int -> Yojson.Basic.t -> string
Sourceval of_json_msg_error : string -> 'a
Sourceval of_json_error : ?depth:int -> ?width:int -> json:Yojson.Basic.t -> string -> 'a
Sourceval of_json_msg_unexpected_variant : string -> 'a
Sourceval of_json_unexpected_variant : ?depth:int -> ?width:int -> json:Yojson.Basic.t -> string -> 'a
Sourceval dangerous_of_json_error : ?depth:int -> ?width:int -> json:Yojson.Basic.t -> string -> 'a
Sourceval of_json_error_type_mismatch : Yojson.Basic.t -> string -> 'a
Sourceval of_string : string -> Yojson.Basic.t
Sourcetype 'a to_json = 'a -> json

Describe how to encode a value into JSON.

Sourceval to_json : json to_json
Sourcetype 'a of_json = json -> 'a

Describe how to decode a value from JSON.

Sourceval of_json : json of_json
Sourcemodule Of_json : sig ... end
Sourcemodule To_json : sig ... end
Sourcemodule Primitives : sig ... end