package geojsone

  1. Overview
  2. Docs
type value = [
  1. | `Null
  2. | `Bool of bool
  3. | `Float of float
  4. | `String of string
  5. | `A of value list
  6. | `O of (string * value) list
]
type t = [
  1. | `A of value list
  2. | `O of (string * value) list
]
val value : t -> value
module List : sig ... end
type error_location = (int * int) * (int * int)
type read_value_error = [
  1. | `Error of error_location * Jsone.error
  2. | `Unexpected of [ `Lexeme of error_location * Jsone.lexeme * string | `End_of_input ]
]
type read_error = [
  1. | read_value_error
  2. | `Not_a_t of value
]
val json_of_src : Uutfe.src -> (value, [> read_value_error ]) result
val value_to_dst : ?minify:bool -> Jsone.dst -> value -> unit
exception Parse_error of value * string
val parse_error : value -> ('a, unit, string, 'b) format4 -> 'a
val wrap : 'a -> [> `A of 'a list ]
val unwrap : [< `A of value list | `Bool of bool | `Float of float | `Null | `O of (string * value) list | `String of string A ] -> value
val read_error_description : [< `Error of error_location * Jsone.error & 'a * [< `Expected of [< `Aval of bool | `Comment | `Eoi | `Json | `Name | `Name_sep | `Omem of bool | `Value ] | `Illegal_BOM | `Illegal_bytes of string | `Illegal_escape of [< `Lone_hi_surrogate of int | `Lone_lo_surrogate of int | `Not_esc_uchar of Uchar.t | `Not_hex_uchar of Uchar.t | `Not_lo_surrogate of int ] | `Illegal_literal of string | `Illegal_number of string | `Illegal_string_uchar of Uchar.t | `Unclosed of [< `As | `Comment | `Os | `String ] ] | `Not_a_t of value & 'b | `Unexpected of [ `End_of_input | `Lexeme of error_location * Jsone.lexeme * string ] & [< `End_of_input | `Lexeme of 'c * 'd * string ] ] -> string
val read_error_location : [< `Error of error_location * Jsone.error & error_location * 'a | `Not_a_t of value & 'b | `Unexpected of [ `End_of_input | `Lexeme of error_location * Jsone.lexeme * string ] & [< `End_of_input | `Lexeme of error_location * 'c * 'd ] ] -> error_location option
val value_from_src_result : Uutfe.src -> (value, [> read_value_error ]) result
val value_from_src : Uutfe.src -> value
val ensure_document_result : value -> ([> t ], [> read_error ]) result
val ensure_document : value -> [> t ]
val unit : unit -> [> `Null ]
val get_unit : value -> unit
val bool : 'a -> [> `Bool of 'a ]
val get_bool : value -> bool
val string : 'a -> [> `String of 'a ]
val get_string : value -> string
val int : int -> [> `Float of float ]
val int32 : int32 -> [> `Float of float ]
val int64 : int64 -> [> `Float of float ]
val get_int : value -> int
val get_int32 : value -> int32
val get_int64 : value -> int64
val float : 'a -> [> `Float of 'a ]
val get_float : value -> float
val list : ('a -> 'b) -> 'a list -> [> `A of 'b list ]
val get_list : (value -> 'a) -> value -> 'a list
val strings : 'a list -> [> `A of [> `String of 'a ] list ]
val get_strings : value -> string list
val option : ('a -> 'b) -> 'a option -> [> `A of 'b list | `Null ]
val get_option : (value -> 'a) -> value -> 'a option
val dict : 'a -> [> `O of 'a ]
val get_dict : value -> (string * value) list
val pair : ('a -> 'b) -> ('c -> 'b) -> ('a * 'c) -> [> `A of 'b list ]
val get_pair : (value -> 'a) -> (value -> 'b) -> value -> 'a * 'b
val triple : ('a -> 'b) -> ('c -> 'b) -> ('d -> 'b) -> ('a * 'c * 'd) -> [> `A of 'b list ]
val get_triple : (value -> 'a) -> (value -> 'b) -> (value -> 'c) -> value -> 'a * 'b * 'c
val mem : [> `O of ('b * 'a) list ] as 'a -> 'b list -> bool
val find : [> `O of ('b * 'a) list ] as 'a -> 'b list -> 'a
val find_opt : [> `O of ('b * 'a) list ] as 'a -> 'b list -> 'a option
val map_dict : ([> `Null ] as 'a -> 'a option) -> ('b * 'a) list -> 'b -> ('b * 'a) list
val map : ([> `Null | `O of ('b * 'a) list ] as 'a -> 'a option) -> 'a -> 'b list -> 'c
val update : [> `Null | `O of ('b * 'a) list ] as 'a -> 'b list -> 'a option -> 'a
exception Not_utf8
val is_valid_utf8 : string -> bool
val encode_string : string -> [> `O of (string * [> `String of string ]) list | `String of string ]
val decode_string : [> `O of (string * [> `String of string ]) list | `String of string ] -> string option
val decode_string_exn : value -> string
val of_sexp : Sexplib0.Sexp.t -> [> `A of 'a list | `O of (string * [> `String of string ]) list | `String of string ] as 'a
val value_of_sexp : Sexplib0.Sexp.t -> [> `A of 'a list | `O of (string * [> `String of string ]) list | `String of string ] as 'a
val t_of_sexp : Sexplib0.Sexp.t -> [> `A of [> `A of 'a | `O of (string * [> `String of string ]) list | `String of string ] list as 'a | `O of (string * [> `String of string ]) list ]
val to_sexp : value -> Sexplib0.Sexp.t
val sexp_of_value : value -> Sexplib0.Sexp.t
val sexp_of_t : t -> Sexplib0.Sexp.t
OCaml

Innovation. Community. Security.