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)
- Host: GitHub
- URL: https://github.com/sealinesun/jsonx
- Owner: sealinesun
- License: isc
- Created: 2022-05-25T18:24:21.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-25T18:24:54.000Z (about 4 years ago)
- Last Synced: 2024-12-31T10:52:49.365Z (over 1 year ago)
- Topics: html, ocaml, shell, standard-ml
- Language: OCaml
- Homepage: http://erratique.ch/software/jsonc
- Size: 149 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE.md
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.