package piqilib

  1. Overview
  2. Docs
module C = Piqi_common
exception EOF
type obj =
  1. | Piqtype of string
  2. | Typed_piqobj of Piqobj.obj
  3. | Piqobj of Piqobj.obj
  4. | Piqi of C.T.piqi
val unprocessed_piqi_list : Piqi_db.Piqitable.M.key list ref
val process_unprocessed_piqi : unit -> unit
val pre_process_piqi : fname:string -> ?ast:Piqi.C.piq_ast -> C.P.t -> Piqi.C.T.piqi
val default_piqtype : Piqi_db.C.T.piqtype option ref
val check_piqtype : string -> unit
val find_piqtype : ?check:bool -> Piqi_impl_piqi.Piqi_impl_piqi.name -> Piqi_db.C.T.piqtype
val process_default_piqtype : ?check:bool -> Piqi_impl_piqi.Piqi_impl_piqi.name -> unit
val get_current_piqtype : Piqi_db.C.T.piqtype option -> 'a -> Piqi_db.C.T.piqtype
val read_piq_ast : skip_trailing_comma:bool -> (string * (Piq_parser.L.token * (int * int)) Stream.t) -> Piqi_db.C.T.piqtype option -> C.piq_ast
val piqi_of_piq : string -> Piqobj_of_piq.C.piq_ast -> Piqi.C.T.piqi
val load_piq_from_ast : C.T.piqtype option -> Piqobj_of_piq.C.piq_ast -> obj
val load_piq : C.T.piqtype option -> ?skip_trailing_comma:bool -> (string * (Piq_parser.L.token * (int * int)) Stream.t) -> obj
val original_piqi : C.P.t -> C.P.t
val piqi_ast_to_piq : Piqi_pp.C.piq_ast -> [> `typed of Piq_ast.Typed.t ]
val piqi_to_piq : C.P.t -> [> `typed of Piq_ast.Typed.t ]
val gen_piq : ?preserve_loc:bool -> obj -> Piqobj_to_piq.C.piq_ast
val write_piq_ast : (Piq_ast.Piq_ast.ast -> unit) -> Piq_ast.Piq_ast.ast -> unit
val to_piq_channel : out_channel -> obj -> unit
val to_piq_string : obj -> string
val read_pib_field : C.Piqirun.IBuf.t -> int * C.Piqirun.t
val piqobj_to_protobuf : int -> Piqobj.obj -> Piqobj_to_protobuf.C.Piqirun.OBuf.t
val pib_typehint_code : int
val load_pib : C.T.piqtype option -> C.Piqirun.IBuf.t -> obj
val out_piqtypes : (Piqi_impl_piqi.Piqi_impl_piqi.typename * int) list ref
val next_out_code : int ref
val find_add_pib_typehint : Piqi_impl_piqi.Piqi_impl_piqi.typename -> C.T.Piqirun.OBuf.t option * int
val to_pib_channel : out_channel -> obj -> unit
val to_pib_string : obj -> string
val to_pb_channel : out_channel -> obj -> unit
val to_pb_string : obj -> string
val piqi_of_json : ?process:bool -> Piqobj_of_json.json -> Piqi.C.T.piqi
val piqi_to_json : Piqi.C.P.t -> string * Piqobj_to_json.json
val gen_json_common : plain:bool -> obj -> Piqi_impl_piqi.Piqi_impl_piqi.name * Piqobj_to_json.json
val gen_json : obj -> Piqobj_to_json.json
val gen_plain_json : obj -> Piqobj_to_json.json
val to_json_channel : out_channel -> obj -> unit
val to_json_string : ?pretty_print:bool -> obj -> string
val is_primitive : Piqi_impl_piqi.Piqi_impl_piqi.piqtype -> bool
val piqi_of_xml : [> `Elem of Piqobj_of_xml.xml_elem ] -> Piqi.C.T.piqi
val piqi_to_xml : Piqi.C.P.t -> Piqobj_to_xml.xml
val gen_xml : obj -> Piqi_xml.xml
val to_xml_channel : out_channel -> obj -> unit
val to_xml_string : ?pretty_print:bool -> obj -> string
val read_xml_ast : Piqi_xml.xml_parser -> Piqi_xml.xml
val load_xml : C.T.piqtype -> Piqi_xml.xml_parser -> obj
val init : unit -> unit
val fname : string
val load_piq_or_pib : (unit -> obj) -> is_piqi_input:bool -> obj
val from_piq_string : C.T.piqtype -> string -> is_piqi_input:bool -> obj
val from_pib_string : C.T.piqtype -> string -> is_piqi_input:bool -> obj
val from_json_string : C.T.piqtype -> string -> obj
val from_pb_string : C.T.piqtype -> string -> obj
val from_xml_string : C.T.piqtype -> string -> obj
val parse_obj : Piqi.C.T.piqtype -> [< `json | `pb | `pib | `piq | `xml ] -> string -> obj
val gen_obj : pretty_print:bool -> [< `json | `pb | `pib | `piq | `xml ] -> obj -> string
type options = {
  1. mutable json_omit_missing_fields : bool;
  2. mutable pretty_print : bool;
  3. mutable use_strict_parsing : bool;
  4. mutable piq_frameless_output : bool;
  5. mutable piq_frameless_input : bool;
  6. mutable piq_relaxed_parsing : bool;
}
val make_options : ?pretty_print:bool -> ?json_omit_missing_fields:bool -> ?json_omit_null_fields:bool -> ?use_strict_parsing:bool -> ?piq_frameless_output:bool -> ?piq_frameless_input:bool -> ?piq_relaxed_parsing:bool -> unit -> options
val set_options : options -> unit
val convert : opts:options -> Piqi.C.T.piqtype -> [< `json | `pb | `pib | `piq | `xml ] -> [< `json | `pb | `pib | `piq | `xml json xml ] -> string -> string
OCaml

Innovation. Community. Security.