package sonet

  1. Overview
  2. Docs
type error =
  1. | Unexpected_json_type of string * string
  2. | Array_length of int * int
  3. | Unknown_constructor of string * string
  4. | Missing_object_field of string
val string_of_error : error -> string
exception Json_conv_error of error
val to_string : ?permissive:bool -> Json.t -> string
val of_string : string -> Json.t
val to_int : ?permissive:bool -> Json.t -> int
val of_int : int -> Json.t
val to_int64 : ?permissive:bool -> Json.t -> int64
val of_int64 : int64 -> Json.t
val to_float : ?permissive:bool -> Json.t -> float
val of_float : float -> Json.t
val to_bool : ?permissive:bool -> Json.t -> bool
val of_bool : bool -> Json.t
val raise_unexpected_json_type : string -> string -> 'a
val raise_short_array : int -> int -> 'a
val raise_unknown_constructor : string -> string -> 'a
val check_array_with_length : 'a array -> int -> unit
val get_variant_constructor : Json.t -> string * Json.t array
val to_array : Json.t -> Json.t array
val array_elem : Json.t array -> int -> Json.t
val to_list : Json.t -> Json.t list
type object_table
val to_object_table : Json.t -> object_table
val object_field : object_table -> string -> Json.t
val optional_object_field : object_table -> string -> Json.t
val has_object_field : object_table -> string -> bool
OCaml

Innovation. Community. Security.