package yojson-five

  1. Overview
  2. Docs
include module type of struct include Yojson.Safe end
val pp : Stdlib.Format.formatter -> {t}2 -> unit
val show : {t}2 -> string
val equal : {t}2 -> {t}2 -> bool
val to_basic : {t}2 -> Yojson__.Basic.t
val to_string : ?buf:Stdlib.Buffer.t -> ?len:int -> ?suf:string -> ?std:bool -> {t}2 -> string
val to_channel : ?buf:Stdlib.Buffer.t -> ?len:int -> ?suf:string -> ?std:bool -> Stdlib.out_channel -> {t}2 -> unit
val to_output : ?buf:Stdlib.Buffer.t -> ?len:int -> ?suf:string -> ?std:bool -> < output : string -> int -> int -> int.. > -> {t}2 -> unit
val to_file : ?len:int -> ?std:bool -> ?suf:string -> string -> {t}2 -> unit
val to_buffer : ?suf:string -> ?std:bool -> Stdlib.Buffer.t -> {t}2 -> unit
val seq_to_string : ?buf:Stdlib.Buffer.t -> ?len:int -> ?suf:string -> ?std:bool -> {t}2 Stdlib.Seq.t -> string
val seq_to_channel : ?buf:Stdlib.Buffer.t -> ?len:int -> ?suf:string -> ?std:bool -> Stdlib.out_channel -> {t}2 Stdlib.Seq.t -> unit
val seq_to_file : ?len:int -> ?suf:string -> ?std:bool -> string -> {t}2 Stdlib.Seq.t -> unit
val seq_to_buffer : ?suf:string -> ?std:bool -> Stdlib.Buffer.t -> {t}2 Stdlib.Seq.t -> unit
val write_t : Stdlib.Buffer.t -> {t}2 -> unit
val sort : {t}2 -> {t}2
val write_null : Stdlib.Buffer.t -> unit -> unit
val write_bool : Stdlib.Buffer.t -> bool -> unit
val write_int : Stdlib.Buffer.t -> int -> unit
val write_float : Stdlib.Buffer.t -> float -> unit
val write_std_float : Stdlib.Buffer.t -> float -> unit
val write_float_prec : int -> Stdlib.Buffer.t -> float -> unit
val write_std_float_prec : int -> Stdlib.Buffer.t -> float -> unit
val write_string : Stdlib.Buffer.t -> string -> unit
val write_intlit : Stdlib.Buffer.t -> string -> unit
val write_assoc : Stdlib.Buffer.t -> (string * {t}2) list -> unit
val write_list : Stdlib.Buffer.t -> {t}2 list -> unit
val write_tuple : Stdlib.Buffer.t -> {t}2 list -> unit
val write_std_tuple : Stdlib.Buffer.t -> {t}2 list -> unit
val write_variant : Stdlib.Buffer.t -> string -> {t}2 option -> unit
val write_std_variant : Stdlib.Buffer.t -> string -> {t}2 option -> unit
val write_json : Stdlib.Buffer.t -> {t}2 -> unit
val write_std_json : Stdlib.Buffer.t -> {t}2 -> unit
val pretty_print : ?std:bool -> Stdlib.Format.formatter -> {t}2 -> unit
val pretty_to_string : ?std:bool -> {t}2 -> string
val pretty_to_channel : ?std:bool -> Stdlib.out_channel -> {t}2 -> unit
val prettify : ?std:bool -> string -> string
val compact : ?std:bool -> string -> string
exception Finally of exn * exn
type lexer_state = Yojson__.Common.Lexer_state.t = {
  1. buf : Stdlib.Buffer.t;
  2. mutable lnum : int;
  3. mutable bol : int;
  4. mutable fname : string option;
}
val init_lexer : ?buf:Stdlib.Buffer.t -> ?fname:string -> ?lnum:int -> unit -> lexer_state
val from_lexbuf : lexer_state -> ?stream:bool -> Stdlib.Lexing.lexbuf -> {t}2
val seq_from_string : ?buf:Stdlib.Buffer.t -> ?fname:string -> ?lnum:int -> string -> {t}2 Stdlib.Seq.t
val seq_from_channel : ?buf:Stdlib.Buffer.t -> ?fin:(unit -> unit) -> ?fname:string -> ?lnum:int -> Stdlib.in_channel -> {t}2 Stdlib.Seq.t
val seq_from_file : ?buf:Stdlib.Buffer.t -> ?fname:string -> ?lnum:int -> string -> {t}2 Stdlib.Seq.t
val seq_from_lexbuf : lexer_state -> ?fin:(unit -> unit) -> Stdlib.Lexing.lexbuf -> {t}2 Stdlib.Seq.t
type json_line = [
  1. | `Exn of exn
  2. | `Json of {t}2
]
val lineseq_from_channel : ?buf:Stdlib.Buffer.t -> ?fin:(unit -> unit) -> ?fname:string -> ?lnum:int -> Stdlib.in_channel -> json_line Stdlib.Seq.t
val lineseq_from_file : ?buf:Stdlib.Buffer.t -> ?fname:string -> ?lnum:int -> string -> json_line Stdlib.Seq.t
val read_t : lexer_state -> Stdlib.Lexing.lexbuf -> {t}2
val finish_string : lexer_state -> Stdlib.Lexing.lexbuf -> string
val read_string : lexer_state -> Stdlib.Lexing.lexbuf -> string
val read_ident : lexer_state -> Stdlib.Lexing.lexbuf -> string
val map_string : lexer_state -> (string -> int -> int -> 'a) -> Stdlib.Lexing.lexbuf -> 'a
val map_ident : lexer_state -> (string -> int -> int -> 'a) -> Stdlib.Lexing.lexbuf -> 'a
type variant_kind = [
  1. | `Double_quote
  2. | `Edgy_bracket
  3. | `Square_bracket
]
val start_any_variant : lexer_state -> Stdlib.Lexing.lexbuf -> variant_kind
val finish_variant : lexer_state -> Stdlib.Lexing.lexbuf -> {t}2 option
val finish_skip_variant : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_lt : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_gt : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_comma : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val finish_stringlit : lexer_state -> Stdlib.Lexing.lexbuf -> string
val finish_skip_stringlit : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val finish_escaped_char : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val finish_comment : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_space : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_eof : Stdlib.Lexing.lexbuf -> bool
val read_null : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_null_if_possible : lexer_state -> Stdlib.Lexing.lexbuf -> bool
val read_bool : lexer_state -> Stdlib.Lexing.lexbuf -> bool
val read_int : lexer_state -> Stdlib.Lexing.lexbuf -> int
val read_int8 : lexer_state -> Stdlib.Lexing.lexbuf -> char
val read_int32 : lexer_state -> Stdlib.Lexing.lexbuf -> int32
val read_int64 : lexer_state -> Stdlib.Lexing.lexbuf -> int64
val read_number : lexer_state -> Stdlib.Lexing.lexbuf -> float
val skip_ident : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_sequence : ('a -> lexer_state -> Stdlib.Lexing.lexbuf -> 'a) -> 'a -> lexer_state -> Stdlib.Lexing.lexbuf -> 'a
val read_list : (lexer_state -> Stdlib.Lexing.lexbuf -> 'a) -> lexer_state -> Stdlib.Lexing.lexbuf -> 'a list
val read_list_rev : (lexer_state -> Stdlib.Lexing.lexbuf -> 'a) -> lexer_state -> Stdlib.Lexing.lexbuf -> 'a list
val read_array_end : Stdlib.Lexing.lexbuf -> unit
val read_array_sep : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_array : (lexer_state -> Stdlib.Lexing.lexbuf -> 'a) -> lexer_state -> Stdlib.Lexing.lexbuf -> 'a array
val read_tuple : (int -> 'a -> lexer_state -> Stdlib.Lexing.lexbuf -> 'a) -> 'a -> lexer_state -> Stdlib.Lexing.lexbuf -> 'a
val start_any_tuple : lexer_state -> Stdlib.Lexing.lexbuf -> bool
val read_lpar : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_rpar : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_tuple_end : Stdlib.Lexing.lexbuf -> unit
val read_tuple_end2 : lexer_state -> bool -> Stdlib.Lexing.lexbuf -> unit
val read_tuple_sep : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_tuple_sep2 : lexer_state -> bool -> Stdlib.Lexing.lexbuf -> unit
val read_lbr : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_rbr : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_fields : ('acc -> string -> lexer_state -> Stdlib.Lexing.lexbuf -> 'acc) -> 'acc -> lexer_state -> Stdlib.Lexing.lexbuf -> 'acc
val read_abstract_fields : (lexer_state -> Stdlib.Lexing.lexbuf -> 'key) -> ('acc -> 'key -> lexer_state -> Stdlib.Lexing.lexbuf -> 'acc) -> 'acc -> lexer_state -> Stdlib.Lexing.lexbuf -> 'acc
val read_lcurl : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_object_end : Stdlib.Lexing.lexbuf -> unit
val read_object_sep : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_colon : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val read_json : lexer_state -> Stdlib.Lexing.lexbuf -> {t}2
val skip_json : lexer_state -> Stdlib.Lexing.lexbuf -> unit
val buffer_json : lexer_state -> Stdlib.Lexing.lexbuf -> unit
module Util : sig ... end
include sig ... end
type t = Yojson.Safe.t
val from_string : ?fname:string -> ?lnum:int -> string -> (t, string) Stdlib.result
val from_channel : ?fname:string -> ?lnum:int -> Stdlib.in_channel -> (t, string) Stdlib.result
val from_file : ?fname:string -> ?lnum:int -> string -> (t, string) Stdlib.result
OCaml

Innovation. Community. Security.