package json-data-encoding-bson

  1. Overview
  2. Docs
Type-safe encoding to and decoding from JSON (bson support)

Install

Dune Dependency

Authors

Maintainers

Sources

json-data-encoding-0.9.1.tar.gz
md5=037e172c8d789b1aea953bb59936626c
sha512=725669d5f33cf17104c6a3198ff55325514b787066ae6413dbd974ae13be5288bf9e7cc3418468ad5b5acbefb798c2cb208233dec24a372b135065ad04d9644c

Description

Published: 28 Jan 2021

README

json-data-encoding

This library is a collection of type-aware JSON utilities for OCaml.

  • Json_encoding contains an 'a encoding type that represents the JSON encoding of OCaml values of type 'a, and a collection of combinators to build them. These encodings can be used to serialize / deserialize OCaml values to / from JSON documents. JSON schemas can also be generated automatically to produce documented, interoperable JSON formats.

  • Json_schema contains an OCaml intermediate representation for the JSON schema document grammar description language, along with translators to / from the concrete JSON schema format.

  • Json_query contains various utilities to manipulate, introspect and update JSON data.

  • Json_repr defines an abstraction over JSON representations. This module is mainly useful when using the functorial interface of the library, or if you use several JSON libraries in your program and want to convert data from one JSON representation to another.

The type of JSON documents handled by this library is directly compatible with ezjsonm, but converters are provided for yojson users, and an advanced functorial interface allows you to use any JSON representation. Two other representations are also provided.

  • Json_repr_browser interfaces JavaScripts objects. It is available only when compiling to JavaScript via js_of_ocaml. Provided by the extra package json-data-encoding-browser.

  • Json_repr_bson is an implementation of a subset of BSON. Provided by the extra package json-data-encoding-bson.

Thanks to polymorphic variants, this library does not depend on any JSON library, so you are free to use whichever you want for printing and parsing.

Dependencies (4)

  1. ocplib-endian >= "1.0"
  2. json-data-encoding = version
  3. dune >= "1.7"
  4. ocaml >= "4.08"

Dev Dependencies

None

Used by (3)

  1. data-encoding >= "0.3" & < "0.5"
  2. resto >= "0.6"
  3. resto-json >= "0.6"

Conflicts

None

OCaml

Innovation. Community. Security.