package edn

  1. Overview
  2. Docs
Parsing OCaml library for EDN format

Install

Dune Dependency

Authors

Maintainers

Sources

edn-0.1.6-1-gff9db95.tbz
sha256=50057e9150b5ef534d623c1885517ce6246ddead9b9913c19af4f642e98f31f4
md5=8ebf3671d4787d0a86be6dbe6f96d057

Description

This library implements [EDN][edn] parser and generator for OCaml.

Published: 06 Sep 2018

README

edn — Parsing OCaml library for EDN format

v0.1.6-1-gff9db95

This library implements EDN parser and generator for OCaml.

Homepage: https://github.com/prepor/edn Contact: Andrew Rudenko <ceo@prepor.ru>

Installation

edn can be installed with opam:

opam install edn

If you don't use opam consult the opam file for build instructions.

Usage

Edn.from_string "{:a #foo/bar [1 2 3]}";;
- : Edn.t = `Assoc [(`Keyword (None, "a"), `Tag (Some "foo", "bar", `Vector [`Int 1; `Int 2; `Int 3]))]

PPX generator

There is cconv encoder/decoder in edn.cconv package. You can use it with cconv.ppx to generate encoders/decoders from/to your types.

type book = { title : string; quantity : int} [@@deriving cconv]
type library = { books : book list } [@@deriving cconv];;

Edn_cconv.of_string_exn decode_library "{:books [{:title \"The Catcher in the Rye\" :quantity 10}]}";;
- : library = {books = [{title = "The Catcher in the Rye"; quantity = 10}]}

Documentation

The documentation and API reference is automatically generated by ocamldoc from the interfaces. It can be consulted online and there is a generated version in the doc directory of the distribution.

Dependencies (3)

  1. menhir build & < "20211215"
  2. dune
  3. ocaml >= "4.02.0" & < "5.0.0"

Dev Dependencies (1)

  1. ounit with-test

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.