An open API service indexing awesome lists of open source software.

https://github.com/sealinesun/jsonx

JSON data description and codecs for OCaml (unreleased)
https://github.com/sealinesun/jsonx

html ocaml shell standard-ml

Last synced: about 1 month ago
JSON representation

JSON data description and codecs for OCaml (unreleased)

Awesome Lists containing this project

README

          

Jsonc — JSON data structure codecs for OCaml
-------------------------------------------------------------------------------
%%VERSION%%

Jsonc describes JSON data structures in OCaml with codec
combinators. The resulting typed descriptions enable backend JSON
codecs to encode and decode these structures from/to OCaml values.

Jsonc's codecs can be used with different backends. The library comes
with a [Jsonm][jsonm] backend and a JavaScript backend that depends on
[js_of_ocaml][jsoo] and uses the browsers' builtin JSON codecs.

Jsonc and its backends depend on [Jsonm][jsonm] and
[js_of_ocaml][jsoo]. They are distributed under the ISC license.

Home page: http://erratique.ch/software/jsonc
Contact: Daniel Bünzli ``

[jsonm]: http://erratique.ch/software/jsonm
[jsoo]: http://ocsigen.org/js_of_ocaml/

## Installation

Jsonc can be installed with `opam`:

opam install jsonm jsonc # jsonm backend
opam install js_of_ocaml jsonc # js_of_ocaml backend
opam install jsonm js_of_ocaml jsonc # all backends

If you don't use `opam` consult the [`opam`](opam) file for build
instructions.

## Documentation

The documentation and API reference is automatically generated by from
the interfaces. It can be consulted [online][doc] or via `odig doc
jsonc`.

[doc]: http://erratique.ch/software/jsonc/doc/Jsonc

## Sample programs

If you installed Jsonc with `opam` sample programs are located in
the directory `opam config var jsonc:doc`.

In the distribution sample programs are located in the `test`
directory of the distribution. They can be built with:

ocamlbuild -use-ocamlfind test/tests.otarget

The resulting binaries are in `_build/test`.

- `test.native` tests the library, nothing should fail.