package sonet

  1. Overview
  2. Docs
type parse_state
val init_parse_state : unit -> parse_state
type parse_result =
  1. | Json_value of Json.t * int
  2. | Json_parse_incomplete of parse_state
val parse : parse_state -> string -> parse_result
val parse_substring : parse_state -> string -> int -> int -> parse_result
val finish_parse : parse_state -> Json.t option
val num_chars_parsed : parse_state -> int
type error =
  1. | Unexpected_char of int * char * string
  2. | Invalid_value of int * string * string
  3. | Invalid_leading_zero of int * string
  4. | Unterminated_value of int * string
  5. | Internal_error of int * string
val string_of_error : error -> string
exception Parse_error of error
val of_string : string -> Json.t
val of_substring : string -> int -> int -> Json.t
OCaml

Innovation. Community. Security.