package yajl

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type !'a int_callback = [
  1. | `Int of 'a -> int -> 'a
  2. | `Int64 of 'a -> Int64.t -> 'a
]
type !'a float_callback = 'a -> float -> 'a
type !'a number_callbacks = [
  1. | `Parse_numbers of 'a int_callback * 'a float_callback
  2. | `Raw_numbers of 'a -> string -> int -> int -> 'a
]
type !'a callbacks = {
  1. on_null : 'a -> 'a;
  2. on_bool : 'a -> bool -> 'a;
  3. on_number : 'a number_callbacks;
  4. on_string : 'a -> string -> int -> int -> 'a;
  5. on_start_map : 'a -> 'a;
  6. on_map_key : 'a -> string -> int -> int -> 'a;
  7. on_end_map : 'a -> 'a;
  8. on_start_array : 'a -> 'a;
  9. on_end_array : 'a -> 'a;
}
type parser_option = [
  1. | `Allow_comments
  2. | `Allow_multiple_values
  3. | `Allow_partial_values
  4. | `Allow_trailing_garbage
  5. | `Dont_validate_strings
]
type 'a parser
val make_parser : ?options:parser_option list -> 'a callbacks -> 'a -> 'a parser
val parse : ?context:'a -> ?ofs:int -> ?len:int -> ?pinned:bool -> 'a parser -> string -> unit
val complete_parse : ?context:'a -> ?t:('a -> 'a) -> 'a parser -> 'a
exception Parse_error of string
val context : ?t:('a -> 'a) -> 'a parser -> 'a
type gen_option = [
  1. | `Beautify
  2. | `Beautify_with of string
  3. | `Escape_solidus
  4. | `Validate_UTF8
]
type gen
val make_gen : ?options:gen_option list -> unit -> gen
val gen_get_buf : gen -> string * int * int
val gen_clear : gen -> unit
val gen_string : ?ofs:int -> ?len:int -> gen -> string -> unit
exception Gen_invalid_string of string * int * int
val gen_int : gen -> int -> unit
val gen_int64 : gen -> Int64.t -> unit
val gen_float : gen -> float -> unit
exception Gen_invalid_float of float
val gen_number : ?ofs:int -> ?len:int -> gen -> string -> unit
val gen_null : gen -> unit
val gen_bool : gen -> bool -> unit
val gen_start_map : gen -> unit
val gen_end_map : gen -> unit
val gen_start_array : gen -> unit
val gen_end_array : gen -> unit
OCaml

Innovation. Community. Security.