28 lines
428 B
OCaml
28 lines
428 B
OCaml
(** CBOR encoder/decoder, RFC 7049 *)
|
|
|
|
exception Error of string
|
|
|
|
exception Noncanonical of string
|
|
|
|
module Simple : sig
|
|
|
|
type t =
|
|
[ `Null
|
|
| `Undefined
|
|
| `Simple of int
|
|
| `Bool of bool
|
|
| `Int of int
|
|
| `Float of float
|
|
| `Bytes of string
|
|
| `Text of string
|
|
| `Array of t list
|
|
| `Map of (t * t) list
|
|
]
|
|
|
|
val encode : t -> string
|
|
val decode : string -> t
|
|
val decode_partial : string -> t * string
|
|
|
|
val to_diagnostic : t -> string
|
|
|
|
end
|