sig
val version : string
exception Json_error of string
val json_error : string -> 'a
type lexer_state = {
buf : Bi_outbuf.t;
mutable lnum : int;
mutable bol : int;
mutable fname : string option;
}
module Lexer_state :
sig
type t =
Yojson.lexer_state = {
buf : Bi_outbuf.t;
mutable lnum : int;
mutable bol : int;
mutable fname : string option;
}
end
val init_lexer :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> unit -> Yojson.lexer_state
exception End_of_array
exception End_of_object
exception End_of_tuple
exception End_of_input
module Basic :
sig
type json =
[ `Assoc of (string * Yojson.Basic.json) list
| `Bool of bool
| `Float of float
| `Int of int
| `List of Yojson.Basic.json list
| `Null
| `String of string ]
val to_string :
?buf:Bi_outbuf.t ->
?len:int -> ?std:bool -> Yojson.Basic.json -> string
val to_channel :
?buf:Bi_outbuf.t ->
?len:int ->
?std:bool -> Pervasives.out_channel -> Yojson.Basic.json -> unit
val to_output :
?buf:Bi_outbuf.t ->
?len:int ->
?std:bool ->
< output : string -> int -> int -> int; .. > ->
Yojson.Basic.json -> unit
val to_file :
?len:int -> ?std:bool -> string -> Yojson.Basic.json -> unit
val to_outbuf : ?std:bool -> Bi_outbuf.t -> Yojson.Basic.json -> unit
val stream_to_string :
?buf:Bi_outbuf.t ->
?len:int -> ?std:bool -> Yojson.Basic.json Stream.t -> string
val stream_to_channel :
?buf:Bi_outbuf.t ->
?len:int ->
?std:bool ->
Pervasives.out_channel -> Yojson.Basic.json Stream.t -> unit
val stream_to_file :
?len:int -> ?std:bool -> string -> Yojson.Basic.json Stream.t -> unit
val stream_to_outbuf :
?std:bool -> Bi_outbuf.t -> Yojson.Basic.json Stream.t -> unit
val write_null : Bi_outbuf.t -> unit -> unit
val write_bool : Bi_outbuf.t -> bool -> unit
val write_int : Bi_outbuf.t -> int -> unit
val write_float : Bi_outbuf.t -> float -> unit
val write_std_float : Bi_outbuf.t -> float -> unit
val write_float_fast : Bi_outbuf.t -> float -> unit
val write_std_float_fast : Bi_outbuf.t -> float -> unit
val write_string : Bi_outbuf.t -> string -> unit
val write_assoc :
Bi_outbuf.t -> (string * Yojson.Basic.json) list -> unit
val write_list : Bi_outbuf.t -> Yojson.Basic.json list -> unit
val write_json : Bi_outbuf.t -> Yojson.Basic.json -> unit
val write_std_json : Bi_outbuf.t -> Yojson.Basic.json -> unit
val pretty_format : ?std:bool -> Yojson.Basic.json -> Easy_format.t
val pretty_to_string : ?std:bool -> Yojson.Basic.json -> string
val pretty_to_channel :
?std:bool -> Pervasives.out_channel -> Yojson.Basic.json -> unit
val prettify : ?std:bool -> string -> string
val compact : ?std:bool -> string -> string
val from_string :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> string -> Yojson.Basic.json
val from_channel :
?buf:Bi_outbuf.t ->
?fname:string ->
?lnum:int -> Pervasives.in_channel -> Yojson.Basic.json
val from_file :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> string -> Yojson.Basic.json
type lexer_state =
Yojson.Lexer_state.t = {
buf : Bi_outbuf.t;
mutable lnum : int;
mutable bol : int;
mutable fname : string option;
}
val init_lexer :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> unit -> Yojson.Basic.lexer_state
val from_lexbuf :
Yojson.Basic.lexer_state ->
?stream:bool -> Lexing.lexbuf -> Yojson.Basic.json
val stream_from_string :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> string -> Yojson.Basic.json Stream.t
val stream_from_channel :
?buf:Bi_outbuf.t ->
?fin:(unit -> unit) ->
?fname:string ->
?lnum:int -> Pervasives.in_channel -> Yojson.Basic.json Stream.t
val stream_from_file :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> string -> Yojson.Basic.json Stream.t
val stream_from_lexbuf :
Yojson.Basic.lexer_state ->
?fin:(unit -> unit) -> Lexing.lexbuf -> Yojson.Basic.json Stream.t
type json_line = [ `Exn of exn | `Json of Yojson.Basic.json ]
val linestream_from_channel :
?buf:Bi_outbuf.t ->
?fin:(unit -> unit) ->
?fname:string ->
?lnum:int -> Pervasives.in_channel -> Yojson.Basic.json_line Stream.t
val linestream_from_file :
?buf:Bi_outbuf.t ->
?fname:string ->
?lnum:int -> string -> Yojson.Basic.json_line Stream.t
val finish_string : Yojson.Basic.lexer_state -> Lexing.lexbuf -> string
val read_string : Yojson.Basic.lexer_state -> Lexing.lexbuf -> string
val read_ident : Yojson.Basic.lexer_state -> Lexing.lexbuf -> string
val map_string :
Yojson.Basic.lexer_state ->
(string -> int -> int -> 'a) -> Lexing.lexbuf -> 'a
val map_ident :
Yojson.Basic.lexer_state ->
(string -> int -> int -> 'a) -> Lexing.lexbuf -> 'a
type variant_kind = [ `Double_quote | `Edgy_bracket | `Square_bracket ]
val start_any_variant :
Yojson.Basic.lexer_state ->
Lexing.lexbuf -> Yojson.Basic.variant_kind
val finish_variant :
Yojson.Basic.lexer_state -> Lexing.lexbuf -> Yojson.Basic.json option
val finish_skip_variant :
Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_lt : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_gt : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_comma : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val finish_stringlit :
Yojson.Basic.lexer_state -> Lexing.lexbuf -> string
val finish_skip_stringlit :
Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val finish_escaped_char :
Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val finish_comment : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_space : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_eof : Lexing.lexbuf -> bool
val read_null : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_null_if_possible :
Yojson.Basic.lexer_state -> Lexing.lexbuf -> bool
val read_bool : Yojson.Basic.lexer_state -> Lexing.lexbuf -> bool
val read_int : Yojson.Basic.lexer_state -> Lexing.lexbuf -> int
val read_int8 : Yojson.Basic.lexer_state -> Lexing.lexbuf -> char
val read_int32 : Yojson.Basic.lexer_state -> Lexing.lexbuf -> int32
val read_int64 : Yojson.Basic.lexer_state -> Lexing.lexbuf -> int64
val read_number : Yojson.Basic.lexer_state -> Lexing.lexbuf -> float
val skip_ident : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_sequence :
('a -> Yojson.Basic.lexer_state -> Lexing.lexbuf -> 'a) ->
'a -> Yojson.Basic.lexer_state -> Lexing.lexbuf -> 'a
val read_list :
(Yojson.Basic.lexer_state -> Lexing.lexbuf -> 'a) ->
Yojson.Basic.lexer_state -> Lexing.lexbuf -> 'a list
val read_list_rev :
(Yojson.Basic.lexer_state -> Lexing.lexbuf -> 'a) ->
Yojson.Basic.lexer_state -> Lexing.lexbuf -> 'a list
val read_array_end : Lexing.lexbuf -> unit
val read_array_sep : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_array :
(Yojson.Basic.lexer_state -> Lexing.lexbuf -> 'a) ->
Yojson.Basic.lexer_state -> Lexing.lexbuf -> 'a array
val read_tuple :
(int -> 'a -> Yojson.Basic.lexer_state -> Lexing.lexbuf -> 'a) ->
'a -> Yojson.Basic.lexer_state -> Lexing.lexbuf -> 'a
val start_any_tuple : Yojson.Basic.lexer_state -> Lexing.lexbuf -> bool
val read_lpar : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_rpar : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_tuple_end : Lexing.lexbuf -> unit
val read_tuple_end2 :
Yojson.Basic.lexer_state -> bool -> Lexing.lexbuf -> unit
val read_tuple_sep : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_tuple_sep2 :
Yojson.Basic.lexer_state -> bool -> Lexing.lexbuf -> unit
val read_lbr : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_rbr : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_fields :
('a -> string -> Yojson.Basic.lexer_state -> Lexing.lexbuf -> 'a) ->
'a -> Yojson.Basic.lexer_state -> Lexing.lexbuf -> 'a
val read_lcurl : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_object_end : Lexing.lexbuf -> unit
val read_object_sep : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_colon : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
val read_json :
Yojson.Basic.lexer_state -> Lexing.lexbuf -> Yojson.Basic.json
val skip_json : Yojson.Basic.lexer_state -> Lexing.lexbuf -> unit
module Util :
sig
exception Type_error of string * Yojson.Basic.json
exception Undefined of string * Yojson.Basic.json
val ( |> ) : 'a -> ('a -> 'b) -> 'b
val member : string -> Yojson.Basic.json -> Yojson.Basic.json
val index : int -> Yojson.Basic.json -> Yojson.Basic.json
val map :
(Yojson.Basic.json -> Yojson.Basic.json) ->
Yojson.Basic.json -> Yojson.Basic.json
val to_assoc :
Yojson.Basic.json -> (string * Yojson.Basic.json) list
val to_option :
(Yojson.Basic.json -> 'a) -> Yojson.Basic.json -> 'a option
val to_bool : Yojson.Basic.json -> bool
val to_bool_option : Yojson.Basic.json -> bool option
val to_number : Yojson.Basic.json -> float
val to_number_option : Yojson.Basic.json -> float option
val to_float : Yojson.Basic.json -> float
val to_float_option : Yojson.Basic.json -> float option
val to_int : Yojson.Basic.json -> int
val to_int_option : Yojson.Basic.json -> int option
val to_list : Yojson.Basic.json -> Yojson.Basic.json list
val to_string : Yojson.Basic.json -> string
val to_string_option : Yojson.Basic.json -> string option
val convert_each :
(Yojson.Basic.json -> 'a) -> Yojson.Basic.json -> 'a list
val filter_map : ('a -> 'b option) -> 'a list -> 'b list
val flatten : Yojson.Basic.json list -> Yojson.Basic.json list
val filter_index :
int -> Yojson.Basic.json list -> Yojson.Basic.json list
val filter_list :
Yojson.Basic.json list -> Yojson.Basic.json list list
val filter_member :
string -> Yojson.Basic.json list -> Yojson.Basic.json list
val filter_assoc :
Yojson.Basic.json list -> (string * Yojson.Basic.json) list list
val filter_bool : Yojson.Basic.json list -> bool list
val filter_int : Yojson.Basic.json list -> int list
val filter_float : Yojson.Basic.json list -> float list
val filter_number : Yojson.Basic.json list -> float list
val filter_string : Yojson.Basic.json list -> string list
end
end
module Safe :
sig
type json =
[ `Assoc of (string * Yojson.Safe.json) list
| `Bool of bool
| `Float of float
| `Int of int
| `Intlit of string
| `List of Yojson.Safe.json list
| `Null
| `String of string
| `Tuple of Yojson.Safe.json list
| `Variant of string * Yojson.Safe.json option ]
val to_basic : Yojson.Safe.json -> Yojson.Basic.json
val to_string :
?buf:Bi_outbuf.t ->
?len:int -> ?std:bool -> Yojson.Safe.json -> string
val to_channel :
?buf:Bi_outbuf.t ->
?len:int ->
?std:bool -> Pervasives.out_channel -> Yojson.Safe.json -> unit
val to_output :
?buf:Bi_outbuf.t ->
?len:int ->
?std:bool ->
< output : string -> int -> int -> int; .. > ->
Yojson.Safe.json -> unit
val to_file :
?len:int -> ?std:bool -> string -> Yojson.Safe.json -> unit
val to_outbuf : ?std:bool -> Bi_outbuf.t -> Yojson.Safe.json -> unit
val stream_to_string :
?buf:Bi_outbuf.t ->
?len:int -> ?std:bool -> Yojson.Safe.json Stream.t -> string
val stream_to_channel :
?buf:Bi_outbuf.t ->
?len:int ->
?std:bool ->
Pervasives.out_channel -> Yojson.Safe.json Stream.t -> unit
val stream_to_file :
?len:int -> ?std:bool -> string -> Yojson.Safe.json Stream.t -> unit
val stream_to_outbuf :
?std:bool -> Bi_outbuf.t -> Yojson.Safe.json Stream.t -> unit
val write_null : Bi_outbuf.t -> unit -> unit
val write_bool : Bi_outbuf.t -> bool -> unit
val write_int : Bi_outbuf.t -> int -> unit
val write_float : Bi_outbuf.t -> float -> unit
val write_std_float : Bi_outbuf.t -> float -> unit
val write_float_fast : Bi_outbuf.t -> float -> unit
val write_std_float_fast : Bi_outbuf.t -> float -> unit
val write_string : Bi_outbuf.t -> string -> unit
val write_intlit : Bi_outbuf.t -> string -> unit
val write_assoc :
Bi_outbuf.t -> (string * Yojson.Safe.json) list -> unit
val write_list : Bi_outbuf.t -> Yojson.Safe.json list -> unit
val write_tuple : Bi_outbuf.t -> Yojson.Safe.json list -> unit
val write_std_tuple : Bi_outbuf.t -> Yojson.Safe.json list -> unit
val write_variant :
Bi_outbuf.t -> string -> Yojson.Safe.json option -> unit
val write_std_variant :
Bi_outbuf.t -> string -> Yojson.Safe.json option -> unit
val write_json : Bi_outbuf.t -> Yojson.Safe.json -> unit
val write_std_json : Bi_outbuf.t -> Yojson.Safe.json -> unit
val pretty_format : ?std:bool -> Yojson.Safe.json -> Easy_format.t
val pretty_to_string : ?std:bool -> Yojson.Safe.json -> string
val pretty_to_channel :
?std:bool -> Pervasives.out_channel -> Yojson.Safe.json -> unit
val prettify : ?std:bool -> string -> string
val compact : ?std:bool -> string -> string
val from_string :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> string -> Yojson.Safe.json
val from_channel :
?buf:Bi_outbuf.t ->
?fname:string ->
?lnum:int -> Pervasives.in_channel -> Yojson.Safe.json
val from_file :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> string -> Yojson.Safe.json
type lexer_state =
Yojson.Lexer_state.t = {
buf : Bi_outbuf.t;
mutable lnum : int;
mutable bol : int;
mutable fname : string option;
}
val init_lexer :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> unit -> Yojson.Safe.lexer_state
val from_lexbuf :
Yojson.Safe.lexer_state ->
?stream:bool -> Lexing.lexbuf -> Yojson.Safe.json
val stream_from_string :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> string -> Yojson.Safe.json Stream.t
val stream_from_channel :
?buf:Bi_outbuf.t ->
?fin:(unit -> unit) ->
?fname:string ->
?lnum:int -> Pervasives.in_channel -> Yojson.Safe.json Stream.t
val stream_from_file :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> string -> Yojson.Safe.json Stream.t
val stream_from_lexbuf :
Yojson.Safe.lexer_state ->
?fin:(unit -> unit) -> Lexing.lexbuf -> Yojson.Safe.json Stream.t
type json_line = [ `Exn of exn | `Json of Yojson.Safe.json ]
val linestream_from_channel :
?buf:Bi_outbuf.t ->
?fin:(unit -> unit) ->
?fname:string ->
?lnum:int -> Pervasives.in_channel -> Yojson.Safe.json_line Stream.t
val linestream_from_file :
?buf:Bi_outbuf.t ->
?fname:string ->
?lnum:int -> string -> Yojson.Safe.json_line Stream.t
val finish_string : Yojson.Safe.lexer_state -> Lexing.lexbuf -> string
val read_string : Yojson.Safe.lexer_state -> Lexing.lexbuf -> string
val read_ident : Yojson.Safe.lexer_state -> Lexing.lexbuf -> string
val map_string :
Yojson.Safe.lexer_state ->
(string -> int -> int -> 'a) -> Lexing.lexbuf -> 'a
val map_ident :
Yojson.Safe.lexer_state ->
(string -> int -> int -> 'a) -> Lexing.lexbuf -> 'a
type variant_kind = [ `Double_quote | `Edgy_bracket | `Square_bracket ]
val start_any_variant :
Yojson.Safe.lexer_state -> Lexing.lexbuf -> Yojson.Safe.variant_kind
val finish_variant :
Yojson.Safe.lexer_state -> Lexing.lexbuf -> Yojson.Safe.json option
val finish_skip_variant :
Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_lt : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_gt : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_comma : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val finish_stringlit :
Yojson.Safe.lexer_state -> Lexing.lexbuf -> string
val finish_skip_stringlit :
Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val finish_escaped_char :
Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val finish_comment : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_space : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_eof : Lexing.lexbuf -> bool
val read_null : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_null_if_possible :
Yojson.Safe.lexer_state -> Lexing.lexbuf -> bool
val read_bool : Yojson.Safe.lexer_state -> Lexing.lexbuf -> bool
val read_int : Yojson.Safe.lexer_state -> Lexing.lexbuf -> int
val read_int8 : Yojson.Safe.lexer_state -> Lexing.lexbuf -> char
val read_int32 : Yojson.Safe.lexer_state -> Lexing.lexbuf -> int32
val read_int64 : Yojson.Safe.lexer_state -> Lexing.lexbuf -> int64
val read_number : Yojson.Safe.lexer_state -> Lexing.lexbuf -> float
val skip_ident : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_sequence :
('a -> Yojson.Safe.lexer_state -> Lexing.lexbuf -> 'a) ->
'a -> Yojson.Safe.lexer_state -> Lexing.lexbuf -> 'a
val read_list :
(Yojson.Safe.lexer_state -> Lexing.lexbuf -> 'a) ->
Yojson.Safe.lexer_state -> Lexing.lexbuf -> 'a list
val read_list_rev :
(Yojson.Safe.lexer_state -> Lexing.lexbuf -> 'a) ->
Yojson.Safe.lexer_state -> Lexing.lexbuf -> 'a list
val read_array_end : Lexing.lexbuf -> unit
val read_array_sep : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_array :
(Yojson.Safe.lexer_state -> Lexing.lexbuf -> 'a) ->
Yojson.Safe.lexer_state -> Lexing.lexbuf -> 'a array
val read_tuple :
(int -> 'a -> Yojson.Safe.lexer_state -> Lexing.lexbuf -> 'a) ->
'a -> Yojson.Safe.lexer_state -> Lexing.lexbuf -> 'a
val start_any_tuple : Yojson.Safe.lexer_state -> Lexing.lexbuf -> bool
val read_lpar : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_rpar : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_tuple_end : Lexing.lexbuf -> unit
val read_tuple_end2 :
Yojson.Safe.lexer_state -> bool -> Lexing.lexbuf -> unit
val read_tuple_sep : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_tuple_sep2 :
Yojson.Safe.lexer_state -> bool -> Lexing.lexbuf -> unit
val read_lbr : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_rbr : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_fields :
('a -> string -> Yojson.Safe.lexer_state -> Lexing.lexbuf -> 'a) ->
'a -> Yojson.Safe.lexer_state -> Lexing.lexbuf -> 'a
val read_lcurl : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_object_end : Lexing.lexbuf -> unit
val read_object_sep : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_colon : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
val read_json :
Yojson.Safe.lexer_state -> Lexing.lexbuf -> Yojson.Safe.json
val skip_json : Yojson.Safe.lexer_state -> Lexing.lexbuf -> unit
end
module Raw :
sig
type json =
[ `Assoc of (string * Yojson.Raw.json) list
| `Bool of bool
| `Floatlit of string
| `Intlit of string
| `List of Yojson.Raw.json list
| `Null
| `Stringlit of string
| `Tuple of Yojson.Raw.json list
| `Variant of string * Yojson.Raw.json option ]
val to_string :
?buf:Bi_outbuf.t ->
?len:int -> ?std:bool -> Yojson.Raw.json -> string
val to_channel :
?buf:Bi_outbuf.t ->
?len:int ->
?std:bool -> Pervasives.out_channel -> Yojson.Raw.json -> unit
val to_output :
?buf:Bi_outbuf.t ->
?len:int ->
?std:bool ->
< output : string -> int -> int -> int; .. > ->
Yojson.Raw.json -> unit
val to_file :
?len:int -> ?std:bool -> string -> Yojson.Raw.json -> unit
val to_outbuf : ?std:bool -> Bi_outbuf.t -> Yojson.Raw.json -> unit
val stream_to_string :
?buf:Bi_outbuf.t ->
?len:int -> ?std:bool -> Yojson.Raw.json Stream.t -> string
val stream_to_channel :
?buf:Bi_outbuf.t ->
?len:int ->
?std:bool ->
Pervasives.out_channel -> Yojson.Raw.json Stream.t -> unit
val stream_to_file :
?len:int -> ?std:bool -> string -> Yojson.Raw.json Stream.t -> unit
val stream_to_outbuf :
?std:bool -> Bi_outbuf.t -> Yojson.Raw.json Stream.t -> unit
val write_null : Bi_outbuf.t -> unit -> unit
val write_bool : Bi_outbuf.t -> bool -> unit
val write_intlit : Bi_outbuf.t -> string -> unit
val write_floatlit : Bi_outbuf.t -> string -> unit
val write_stringlit : Bi_outbuf.t -> string -> unit
val write_assoc :
Bi_outbuf.t -> (string * Yojson.Raw.json) list -> unit
val write_list : Bi_outbuf.t -> Yojson.Raw.json list -> unit
val write_tuple : Bi_outbuf.t -> Yojson.Raw.json list -> unit
val write_std_tuple : Bi_outbuf.t -> Yojson.Raw.json list -> unit
val write_variant :
Bi_outbuf.t -> string -> Yojson.Raw.json option -> unit
val write_std_variant :
Bi_outbuf.t -> string -> Yojson.Raw.json option -> unit
val write_json : Bi_outbuf.t -> Yojson.Raw.json -> unit
val write_std_json : Bi_outbuf.t -> Yojson.Raw.json -> unit
val pretty_format : ?std:bool -> Yojson.Raw.json -> Easy_format.t
val pretty_to_string : ?std:bool -> Yojson.Raw.json -> string
val pretty_to_channel :
?std:bool -> Pervasives.out_channel -> Yojson.Raw.json -> unit
val prettify : ?std:bool -> string -> string
val compact : ?std:bool -> string -> string
val from_string :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> string -> Yojson.Raw.json
val from_channel :
?buf:Bi_outbuf.t ->
?fname:string ->
?lnum:int -> Pervasives.in_channel -> Yojson.Raw.json
val from_file :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> string -> Yojson.Raw.json
type lexer_state =
Yojson.Lexer_state.t = {
buf : Bi_outbuf.t;
mutable lnum : int;
mutable bol : int;
mutable fname : string option;
}
val init_lexer :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> unit -> Yojson.Raw.lexer_state
val from_lexbuf :
Yojson.Raw.lexer_state ->
?stream:bool -> Lexing.lexbuf -> Yojson.Raw.json
val stream_from_string :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> string -> Yojson.Raw.json Stream.t
val stream_from_channel :
?buf:Bi_outbuf.t ->
?fin:(unit -> unit) ->
?fname:string ->
?lnum:int -> Pervasives.in_channel -> Yojson.Raw.json Stream.t
val stream_from_file :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> string -> Yojson.Raw.json Stream.t
val stream_from_lexbuf :
Yojson.Raw.lexer_state ->
?fin:(unit -> unit) -> Lexing.lexbuf -> Yojson.Raw.json Stream.t
type json_line = [ `Exn of exn | `Json of Yojson.Raw.json ]
val linestream_from_channel :
?buf:Bi_outbuf.t ->
?fin:(unit -> unit) ->
?fname:string ->
?lnum:int -> Pervasives.in_channel -> Yojson.Raw.json_line Stream.t
val linestream_from_file :
?buf:Bi_outbuf.t ->
?fname:string -> ?lnum:int -> string -> Yojson.Raw.json_line Stream.t
val finish_string : Yojson.Raw.lexer_state -> Lexing.lexbuf -> string
val read_string : Yojson.Raw.lexer_state -> Lexing.lexbuf -> string
val read_ident : Yojson.Raw.lexer_state -> Lexing.lexbuf -> string
val map_string :
Yojson.Raw.lexer_state ->
(string -> int -> int -> 'a) -> Lexing.lexbuf -> 'a
val map_ident :
Yojson.Raw.lexer_state ->
(string -> int -> int -> 'a) -> Lexing.lexbuf -> 'a
type variant_kind = [ `Double_quote | `Edgy_bracket | `Square_bracket ]
val start_any_variant :
Yojson.Raw.lexer_state -> Lexing.lexbuf -> Yojson.Raw.variant_kind
val finish_variant :
Yojson.Raw.lexer_state -> Lexing.lexbuf -> Yojson.Raw.json option
val finish_skip_variant :
Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_lt : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_gt : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_comma : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val finish_stringlit :
Yojson.Raw.lexer_state -> Lexing.lexbuf -> string
val finish_skip_stringlit :
Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val finish_escaped_char :
Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val finish_comment : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_space : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_eof : Lexing.lexbuf -> bool
val read_null : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_null_if_possible :
Yojson.Raw.lexer_state -> Lexing.lexbuf -> bool
val read_bool : Yojson.Raw.lexer_state -> Lexing.lexbuf -> bool
val read_int : Yojson.Raw.lexer_state -> Lexing.lexbuf -> int
val read_int8 : Yojson.Raw.lexer_state -> Lexing.lexbuf -> char
val read_int32 : Yojson.Raw.lexer_state -> Lexing.lexbuf -> int32
val read_int64 : Yojson.Raw.lexer_state -> Lexing.lexbuf -> int64
val read_number : Yojson.Raw.lexer_state -> Lexing.lexbuf -> float
val skip_ident : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_sequence :
('a -> Yojson.Raw.lexer_state -> Lexing.lexbuf -> 'a) ->
'a -> Yojson.Raw.lexer_state -> Lexing.lexbuf -> 'a
val read_list :
(Yojson.Raw.lexer_state -> Lexing.lexbuf -> 'a) ->
Yojson.Raw.lexer_state -> Lexing.lexbuf -> 'a list
val read_list_rev :
(Yojson.Raw.lexer_state -> Lexing.lexbuf -> 'a) ->
Yojson.Raw.lexer_state -> Lexing.lexbuf -> 'a list
val read_array_end : Lexing.lexbuf -> unit
val read_array_sep : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_array :
(Yojson.Raw.lexer_state -> Lexing.lexbuf -> 'a) ->
Yojson.Raw.lexer_state -> Lexing.lexbuf -> 'a array
val read_tuple :
(int -> 'a -> Yojson.Raw.lexer_state -> Lexing.lexbuf -> 'a) ->
'a -> Yojson.Raw.lexer_state -> Lexing.lexbuf -> 'a
val start_any_tuple : Yojson.Raw.lexer_state -> Lexing.lexbuf -> bool
val read_lpar : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_rpar : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_tuple_end : Lexing.lexbuf -> unit
val read_tuple_end2 :
Yojson.Raw.lexer_state -> bool -> Lexing.lexbuf -> unit
val read_tuple_sep : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_tuple_sep2 :
Yojson.Raw.lexer_state -> bool -> Lexing.lexbuf -> unit
val read_lbr : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_rbr : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_fields :
('a -> string -> Yojson.Raw.lexer_state -> Lexing.lexbuf -> 'a) ->
'a -> Yojson.Raw.lexer_state -> Lexing.lexbuf -> 'a
val read_lcurl : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_object_end : Lexing.lexbuf -> unit
val read_object_sep : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_colon : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
val read_json :
Yojson.Raw.lexer_state -> Lexing.lexbuf -> Yojson.Raw.json
val skip_json : Yojson.Raw.lexer_state -> Lexing.lexbuf -> unit
end
type json =
[ `Assoc of (string * Yojson.json) list
| `Bool of bool
| `Float of float
| `Floatlit of string
| `Int of int
| `Intlit of string
| `List of Yojson.json list
| `Null
| `String of string
| `Stringlit of string
| `Tuple of Yojson.json list
| `Variant of string * Yojson.json option ]
type json_max = Yojson.json
val to_string :
?buf:Bi_outbuf.t -> ?len:int -> ?std:bool -> Yojson.json -> string
val to_channel :
?buf:Bi_outbuf.t ->
?len:int -> ?std:bool -> Pervasives.out_channel -> Yojson.json -> unit
val to_output :
?buf:Bi_outbuf.t ->
?len:int ->
?std:bool ->
< output : string -> int -> int -> int; .. > -> Yojson.json -> unit
val to_file : ?len:int -> ?std:bool -> string -> Yojson.json -> unit
val to_outbuf : ?std:bool -> Bi_outbuf.t -> Yojson.json -> unit
val stream_to_string :
?buf:Bi_outbuf.t ->
?len:int -> ?std:bool -> Yojson.json Stream.t -> string
val stream_to_channel :
?buf:Bi_outbuf.t ->
?len:int ->
?std:bool -> Pervasives.out_channel -> Yojson.json Stream.t -> unit
val stream_to_file :
?len:int -> ?std:bool -> string -> Yojson.json Stream.t -> unit
val stream_to_outbuf :
?std:bool -> Bi_outbuf.t -> Yojson.json Stream.t -> unit
val write_null : Bi_outbuf.t -> unit -> unit
val write_bool : Bi_outbuf.t -> bool -> unit
val write_int : Bi_outbuf.t -> int -> unit
val write_float : Bi_outbuf.t -> float -> unit
val write_std_float : Bi_outbuf.t -> float -> unit
val write_float_fast : Bi_outbuf.t -> float -> unit
val write_std_float_fast : Bi_outbuf.t -> float -> unit
val write_string : Bi_outbuf.t -> string -> unit
val write_intlit : Bi_outbuf.t -> string -> unit
val write_floatlit : Bi_outbuf.t -> string -> unit
val write_stringlit : Bi_outbuf.t -> string -> unit
val write_assoc : Bi_outbuf.t -> (string * Yojson.json) list -> unit
val write_list : Bi_outbuf.t -> Yojson.json list -> unit
val write_tuple : Bi_outbuf.t -> Yojson.json list -> unit
val write_std_tuple : Bi_outbuf.t -> Yojson.json list -> unit
val write_variant : Bi_outbuf.t -> string -> Yojson.json option -> unit
val write_std_variant : Bi_outbuf.t -> string -> Yojson.json option -> unit
val write_json : Bi_outbuf.t -> Yojson.json -> unit
val write_std_json : Bi_outbuf.t -> Yojson.json -> unit
val pretty_format : ?std:bool -> Yojson.json -> Easy_format.t
val pretty_to_string : ?std:bool -> Yojson.json -> string
val pretty_to_channel :
?std:bool -> Pervasives.out_channel -> Yojson.json -> unit
end