package bson

  1. Overview
  2. Docs
exception Invalid_objectId
exception Wrong_bson_type
exception Wrong_string
exception Malformed_bson
type t
type special =
  1. | NULL
  2. | MINKEY
  3. | MAXKEY
type element
val empty : t
val is_empty : t -> bool
val add_element : string -> element -> t -> t
val get_element : string -> t -> element
val has_element : string -> t -> bool
val remove_element : string -> t -> t
val encode : t -> string
val decode : string -> t
val create_double : float -> element
val create_string : string -> element
val create_doc_element : t -> element
val create_list : element list -> element
val create_user_binary : string -> element
val create_objectId : string -> element
val create_boolean : bool -> element
val create_utc : int64 -> element
val create_null : unit -> element
val create_regex : string -> string -> element
val create_jscode : string -> element
val create_jscode_w_s : string -> t -> element
val create_int32 : int32 -> element
val create_int64 : int64 -> element
val create_minkey : unit -> element
val create_maxkey : unit -> element
val get_double : element -> float
val get_string : element -> string
val get_doc_element : element -> t
val get_list : element -> element list
val get_generic_binary : element -> string
val get_function_binary : element -> string
val get_uuid_binary : element -> string
val get_md5_binary : element -> string
val get_user_binary : element -> string
val get_objectId : element -> string
val get_boolean : element -> bool
val get_utc : element -> int64
val get_null : element -> special
val get_regex : element -> string * string
val get_jscode : element -> string
val get_jscode_w_s : element -> string * t
val get_int32 : element -> int32
val get_int64 : element -> int64
val get_timestamp : element -> int64
val get_minkey : element -> special
val get_maxkey : element -> special
val all_elements : t -> (string * element) list
val to_simple_json : t -> string
OCaml

Innovation. Community. Security.