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