package containers

  1. Overview
  2. Docs
A modular, clean and powerful extension of the OCaml standard library

Install

Dune Dependency

Authors

Maintainers

Sources

containers-3.16.tbz
sha256=1e7992cb2e59c0d2290d1b6c3a31531b3f310be6170b8ef3dde17ccd876b5b79
sha512=bb124e69ad0690f88393e18eee499be07761e767593558867aab32f643466b43258ced503170b154ca3b56dbd68987abd6d9438cf473707ec9866511589a5b84

doc/containers.cbor/Containers_cbor/index.html

Module Containers_cborSource

CBOR encoder/decoder.

The type is chosen to be compatible with ocaml-cbor. See the RFC.

note this is experimental.

  • since 3.9
Sourcetype t = [
  1. | `Null
  2. | `Undefined
  3. | `Simple of int
  4. | `Bool of bool
  5. | `Int of int64
  6. | `Float of float
  7. | `Bytes of string
  8. | `Text of string
  9. | `Array of t list
  10. | `Map of (t * t) list
  11. | `Tag of int * t
]
Sourceval pp_diagnostic : t CCFormat.printer
Sourceval to_string_diagnostic : t -> string
Sourceval encode : ?buf:Buffer.t -> t -> string
Sourceval decode : string -> (t, string) result
Sourceval decode_exn : string -> t

Like decode.

  • raises Failure

    if the string isn't valid

OCaml

Innovation. Community. Security.