package geojsone

  1. Overview
  2. Docs
val io_buffer_size : int
val pp : Stdlib.Format.formatter -> ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'a
val unsafe_byte : string -> int -> int
val unsafe_blit_from_string : string -> int -> Cstruct.buffer -> int -> int -> unit
val unsafe_blit : string -> int -> Cstruct.t -> int -> int -> unit
val unsafe_set_byte : Cstruct.t -> int -> int -> unit
val ux_eoi : int
val ux_soi : int
val u_nl : int
val u_sp : int
val u_quot : int
val u_lbrack : int
val u_rbrack : int
val u_lbrace : int
val u_rbrace : int
val u_colon : int
val u_comma : int
val u_minus : int
val u_slash : int
val u_bslash : int
val u_rep : int
val must_escape : int -> bool
val is_digit : int -> bool
val is_hex_digit : int -> bool
val is_white : int -> bool
val is_val_sep : int -> bool
type lexeme = [
  1. | `Null
  2. | `Bool of bool
  3. | `String of string
  4. | `Float of float
  5. | `Name of string
  6. | `As
  7. | `Ae
  8. | `Os
  9. | `Oe
]
val pp_lexeme : Stdlib.Format.formatter -> [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string ] -> unit
type error = [
  1. | `Illegal_BOM
  2. | `Illegal_escape of [ `Not_hex_uchar of Stdlib.Uchar.t | `Not_esc_uchar of Stdlib.Uchar.t | `Not_lo_surrogate of int | `Lone_lo_surrogate of int | `Lone_hi_surrogate of int ]
  3. | `Illegal_string_uchar of Stdlib.Uchar.t
  4. | `Illegal_bytes of string
  5. | `Illegal_literal of string
  6. | `Illegal_number of string
  7. | `Unclosed of [ `As | `Os | `String | `Comment ]
  8. | `Expected of [ `Comment | `Value | `Name | `Name_sep | `Json | `Eoi | `Aval of bool | `Omem of bool ]
]
val err_bom : [> `Error of [> `Illegal_BOM ] ]
val err_not_hex : int -> [> `Error of [> `Illegal_escape of [> `Not_hex_uchar of Stdlib.Uchar.t ] ] ]
val err_not_esc : int -> [> `Error of [> `Illegal_escape of [> `Not_esc_uchar of Stdlib.Uchar.t ] ] ]
val err_not_lo : 'a -> [> `Error of [> `Illegal_escape of [> `Not_lo_surrogate of 'a ] ] ]
val err_lone_lo : 'a -> [> `Error of [> `Illegal_escape of [> `Lone_lo_surrogate of 'a ] ] ]
val err_lone_hi : 'a -> [> `Error of [> `Illegal_escape of [> `Lone_hi_surrogate of 'a ] ] ]
val err_str_char : int -> [> `Error of [> `Illegal_string_uchar of Stdlib.Uchar.t ] ]
val err_unclosed_string : [> `Error of [> `Unclosed of [> `String ] ] ]
val err_unclosed_arr : [> `Error of [> `Unclosed of [> `As ] ] ]
val err_unclosed_obj : [> `Error of [> `Unclosed of [> `Os ] ] ]
val err_number : 'a -> [> `Error of [> `Illegal_number of 'a ] ]
val err_literal : 'a -> [> `Error of [> `Illegal_literal of 'a ] ]
val err_exp_value : [> `Error of [> `Expected of [> `Value ] ] ]
val err_exp_name : [> `Error of [> `Expected of [> `Name ] ] ]
val err_exp_nsep : [> `Error of [> `Expected of [> `Name_sep ] ] ]
val err_exp_arr_fst : [> `Error of [> `Expected of [> `Aval of bool ] ] ]
val err_exp_arr_nxt : [> `Error of [> `Expected of [> `Aval of bool ] ] ]
val err_exp_obj_fst : [> `Error of [> `Expected of [> `Omem of bool ] ] ]
val err_exp_obj_nxt : [> `Error of [> `Expected of [> `Omem of bool ] ] ]
val err_exp_json : [> `Error of [> `Expected of [> `Json ] ] ]
val err_exp_eoi : [> `Error of [> `Expected of [> `Eoi ] ] ]
val pp_cp : Stdlib.Format.formatter -> int -> unit
val pp_uchar : Stdlib.Format.formatter -> Stdlib.Uchar.t -> unit
val pp_error : Stdlib.Format.formatter -> [< `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 Stdlib.Uchar.t | `Not_hex_uchar of Stdlib.Uchar.t | `Not_lo_surrogate of int ] | `Illegal_literal of string | `Illegal_number of string | `Illegal_string_uchar of Stdlib.Uchar.t | `Unclosed of [< `As | `Comment | `Os | `String ] ] -> unit
type pos = int * int
type encoding = [
  1. | `UTF_8
  2. | `UTF_16
  3. | `UTF_16BE
  4. | `UTF_16LE
]
type src = unit -> Cstruct.t
type decode = [
  1. | `Await
  2. | `End
  3. | `Lexeme of lexeme
  4. | `Error of error
]
type uncut = [
  1. | `Comment of [ `M | `S ] * string
  2. | `White of string
]
val pp_decode : Stdlib.Format.formatter -> [< `Await | `Comment of [< `M | `S ] * string | `End | `Error of [< `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 Stdlib.Uchar.t | `Not_hex_uchar of Stdlib.Uchar.t | `Not_lo_surrogate of int ] | `Illegal_literal of string | `Illegal_number of string | `Illegal_string_uchar of Stdlib.Uchar.t | `Unclosed of [< `As | `Comment | `Os | `String ] ] | `Lexeme of [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string ] | `White of string ] -> unit
type decoder = {
  1. u : Uutfe.decoder;
  2. buf : Stdlib.Buffer.t;
  3. mutable started : bool;
  4. mutable uncut : bool;
  5. mutable s_line : int;
  6. mutable s_col : int;
  7. mutable e_line : int;
  8. mutable e_col : int;
  9. mutable c : int;
  10. mutable stack : [ `As of pos | `Os of pos ] list;
  11. mutable next_name : bool;
  12. mutable last_start : bool;
}
val baddc : decoder -> int -> unit
val badd : decoder -> unit
val buf : decoder -> string
val dpos : decoder -> int * int
val spos : decoder -> unit
val epos : decoder -> unit
val stack_range : decoder -> unit
val dpop : decoder -> unit
val ret_eoi : 'a -> [> `End ]
val readc : decoder -> unit
val r_ws : decoder -> unit
val r_white : decoder -> unit
val r_u_escape : int option -> int -> int -> decoder -> unit
val r_escape : decoder -> unit
val r_string : decoder -> unit
val r_float : decoder -> [> `Error of [> `Illegal_number of string ] | `Lexeme of [> `Float of float ] ]
val r_literal : decoder -> [> `Error of [> `Illegal_literal of string ] | `Lexeme of [> `Bool of bool | `Null ] ]
val r_value : (decoder -> [> `Error of [> `Illegal_literal of string | `Illegal_number of string ] | `Lexeme of [> `As | `Bool of bool | `Float of float | `Null | `Os | `String of string ] ] as 'a) -> decoder -> 'b
val discard_to : int -> int -> 'a -> decoder -> 'b
val r_arr_val : decoder -> [> `Error of [> `Expected of [> `Aval of bool | `Value ] | `Illegal_literal of string | `Illegal_number of string | `Unclosed of [> `As ] ] | `Lexeme of [> `Ae | `As | `Bool of bool | `Float of float | `Null | `Os | `String of string ] ]
val nxmem : 'a -> decoder -> 'b
val r_obj_value : decoder -> [> `Error of [> `Expected of [> `Name_sep | `Value ] | `Illegal_literal of string | `Illegal_number of string ] | `Lexeme of [> `As | `Bool of bool | `Float of float | `Null | `Os | `String of string ] ]
val r_obj_name : decoder -> [> `Error of [> `Expected of [> `Name | `Omem of bool ] | `Unclosed of [> `Os ] ] | `Lexeme of [> `Name of string | `Oe ] ]
val r_end : decoder -> [> `End | `Error of [> `Expected of [> `Eoi ] ] ]
val r_lexeme : decoder -> [> `End | `Error of [> `Expected of [> `Aval of bool | `Eoi | `Name | `Name_sep | `Omem of bool | `Value ] | `Illegal_literal of string | `Illegal_number of string | `Unclosed of [> `As | `Os ] ] | `Lexeme of [> `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string ] ]
val discard_to_white : decoder -> unit
val r_json : decoder -> [> `Error of [> `Expected of [> `Json ] | `Illegal_literal of string | `Illegal_number of string ] | `Lexeme of [> `As | `Bool of bool | `Float of float | `Null | `Os | `String of string ] ]
val r_start : decoder -> [> `Error of [> `Expected of [> `Json ] | `Illegal_BOM | `Illegal_literal of string | `Illegal_number of string ] | `Lexeme of [> `As | `Bool of bool | `Float of float | `Null | `Os | `String of string ] ]
val nln : [> `ASCII of Stdlib.Uchar.t ]
val decoder : ?encoding: [< `ISO_8859_1 | `US_ASCII | `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ] -> Uutfe.src -> decoder
val decode_uncut : decoder -> [> `Error of [> `Expected of [> `Json ] | `Illegal_BOM | `Illegal_literal of string | `Illegal_number of string ] | `Lexeme of [> `As | `Bool of bool | `Float of float | `Null | `Os | `String of string ] ]
val decode : decoder -> [> decode ]
val decoder_src : decoder -> Uutfe.src
val decoded_range : decoder -> (int * int) * (int * int)
val decoder_encoding : decoder -> [> `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ]
val invalid_arg : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'c
val invalid_bounds : int -> int -> 'a
val expect : string -> [< `Await | `Comment of [< `M | `S ] * string | `End | `Error of [< `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 Stdlib.Uchar.t | `Not_hex_uchar of Stdlib.Uchar.t | `Not_lo_surrogate of int ] | `Illegal_literal of string | `Illegal_number of string | `Illegal_string_uchar of Stdlib.Uchar.t | `Unclosed of [< `As | `Comment | `Os | `String ] ] | `Lexeme of [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string ] | `White of string ] -> 'a
val expect_end : [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string ] -> 'a
val expect_mem_value : [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string ] -> 'a
val expect_arr_value_ae : [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string ] -> 'a
val expect_name_or_oe : [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string ] -> 'a
val expect_json : [< `Await | `Comment of [< `M | `S ] * string | `End | `Error of [< `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 Stdlib.Uchar.t | `Not_hex_uchar of Stdlib.Uchar.t | `Not_lo_surrogate of int ] | `Illegal_literal of string | `Illegal_number of string | `Illegal_string_uchar of Stdlib.Uchar.t | `Unclosed of [< `As | `Comment | `Os | `String ] ] | `Lexeme of [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string ] | `White of string ] -> 'a
val expect_lend : [> `As ] -> [< `Await | `Comment of [< `M | `S ] * string | `End | `Error of [< `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 Stdlib.Uchar.t | `Not_hex_uchar of Stdlib.Uchar.t | `Not_lo_surrogate of int ] | `Illegal_literal of string | `Illegal_number of string | `Illegal_string_uchar of Stdlib.Uchar.t | `Unclosed of [< `As | `Comment | `Os | `String ] ] | `Lexeme of [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string ] | `White of string ] -> 'a
type dst = Cstruct.t -> unit
type encode = [
  1. | `Await
  2. | `End
  3. | `Lexeme of lexeme
]
type encoder = {
  1. dst : dst;
  2. minify : bool;
  3. mutable encode_ : bool;
  4. mutable started : bool;
  5. mutable o : Cstruct.t;
  6. mutable o_pos : int;
  7. mutable o_max : int;
  8. buf : Stdlib.Buffer.t;
  9. mutable stack : [ `As | `Os ] list;
  10. mutable nest : int;
  11. mutable next_name : bool;
  12. mutable last_start : bool;
}
val o_rem : encoder -> int
val dst : encoder -> Cstruct.t -> int -> int -> unit
val flush : encoder -> stop:bool -> unit
val writeb : int -> encoder -> unit
val writes : string -> int -> int -> encoder -> unit
val writebuf : int -> int -> encoder -> unit
val w_indent : encoder -> unit
val w_json_string : string -> encoder -> unit
val w_name : string -> encoder -> unit
val w_value : in_obj:bool -> [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string ] -> encoder -> unit
val w_lexeme : encoder -> [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string Ae Name Oe ] -> unit
val encode_ : encoder -> [< `Await | `Comment of [< `M | `S ] * string | `End | `Lexeme of [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string Ae Name Oe ] | `White of string ] -> unit
val encode_json : encoder -> [< `Await | `Comment of [< `M | `S ] * string | `End | `Lexeme of [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string As Bool Float Null Os String ] | `White of string ] -> unit
val encoder : ?minify:bool -> dst -> encoder
val encode : encoder -> [< `Await | `Comment of [< `M | `S ] * string & [< `M | `S ] * string | `End | `Lexeme of [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string Ae Name Oe ] & [< `Ae | `As | `Bool of bool | `Float of float | `Name of string | `Null | `Oe | `Os | `String of string ] | `White of string ] -> [> `Ok ]
val encoder_dst : encoder -> dst
val encoder_minify : encoder -> bool
module Manual : sig ... end
module Uncut : sig ... end