Library
Module
Module type
Parameter
Class
Class type
OCaml implementation of The Concise Binary Object Representation (CBOR)
This module provides types for CBOR data items as well as function for writing CBOR data items to sequences of bytes and reading CBOR data items from sequences of bytes.
val pp : item Fmt.t
CBOR data item pretty printer. Output resembles the CBOR diagnostic notation.
val read : char Stdlib.Seq.t -> item
read bytes
read a single CBOR data item from the sequence bytes
.
To read multiple data items (i.e. a CBOR data stream) see Signal.to_items
.
val write : item -> char Stdlib.Seq.t
write item
returns a sequence of bytes that encodes item
.
module Signal : sig ... end
Serialization is done by converting CBOR data items to a sequence of signals. Signals can be directly translated to and from bytes. This module provides direct access to signals. This can be used to stream large CBOR data items and also provides the ability to work with indefinite-length CBOR data items.