package melange-json-native

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

The type of a JSON data structure

type json = t

Defined for convenience.

val 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 ]
val 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
val to_string : Yojson.Basic.t -> string
exception Of_string_error of string
type of_json_error =
  1. | Json_error of string
  2. | Unexpected_variant of string
exception Of_json_error of of_json_error
val with_buffer : ((string -> unit) -> 'a) -> string
val iteri_last : (is_last:bool -> int -> 'a -> unit) -> 'a list -> unit
val show_json_type : Yojson.Basic.t -> string
val show_json_error : ?depth:int -> ?width:int -> Yojson.Basic.t -> string
val of_json_msg_error : string -> 'a
val of_json_error : ?depth:int -> ?width:int -> json:Yojson.Basic.t -> string -> 'a
val of_json_msg_unexpected_variant : string -> 'a
val of_json_unexpected_variant : ?depth:int -> ?width:int -> json:Yojson.Basic.t -> string -> 'a
val dangerous_of_json_error : ?depth:int -> ?width:int -> json:Yojson.Basic.t -> string -> 'a
val of_json_error_type_mismatch : Yojson.Basic.t -> string -> 'a
val of_string : string -> Yojson.Basic.t
type 'a to_json = 'a -> json

Describe how to encode a value into JSON.

val to_json : json to_json
type 'a of_json = json -> 'a

Describe how to decode a value from JSON.

val of_json : json of_json
module Of_json : sig ... end
module To_json : sig ... end
module Primitives : sig ... end
OCaml

Innovation. Community. Security.