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.