# \[ANN\] json-data-encoding 0.9

**URL:** <https://discuss.ocaml.org/t/ann-json-data-encoding-0-9/7157>\
**Category:** Community\
**Created:** [January 25, 2021, 11:23am UTC](https://discuss.ocaml.org/t/ann-json-data-encoding-0-9/7157 "2021-01-25T11:23:09Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![raphael-proust](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/raphael-proust/32/415_2.png) [@raphael-proust](https://discuss.ocaml.org/u/raphael-proust)\
**Post date:** [January 25, 2021, 11:23am UTC](https://discuss.ocaml.org/t/ann-json-data-encoding-0-9/7157/1 "2021-01-25T11:23:09Z")

</div>

On behalf of [Nomadic Labs](https://nomadic-labs.com/), I’m happy to announce the release of json-data-encoding version 0.9.

The code is hosted on Gitlab: [Nomadic Labs / json-data-encoding · GitLab](https://gitlab.com/nomadic-labs/json-data-encoding)  
It is distributed under GNU LGPL with linking exception.  
The documentation is available online: [index](https://nomadic-labs.gitlab.io/json-data-encoding/)  
The package is available under opam: `opam install json-data-encoding`

json-data-encoding is a library to define encoder/decoder values to translate OCaml values to JSON and back. It also generates JSON schemas so you can document the value representation. It can use either Ezjsonm or Yojson as backends.

The version 0.9 has the following new features:

- more tests
- memoisation of fixpoint encoding to avoid repeated computations
- support for `format` field for string schemas (see [string — Understanding JSON Schema 7.0 documentation](https://json-schema.org/understanding-json-schema/reference/string.html#format)) (contributed by @levillain.maxime)
- fixed integer bound printing in schemas (bug report by @pw374)
- support for json-lexeme streaming (see details below)
- support for inclusion/exclusion of default-value fields during serialisation (contributed by @levillain.maxime)
- improved union-of-object schemas (contributed by @levillain.maxime)

One major difference with the previous release is the inclusion of a lexeme-streaming JSON constructor. Specifically, the function

```auto
val construct_seq : 't encoding -> 't -> jsonm_lexeme Stdlib.Seq.t

```

generates a sequence of `Jsonm.lexeme` (the . This sequence is lazy (in the sense of `Stdlib.Seq` not of `Stdlib.Lazy`) and it paves the way to a similar feature in `data-encoding`. An interesting feature of sequences is that they can be used in Vanilla OCaml settings as well as Lwt/Async settings where they allow user-driven yielding in between elements.

---

_[View the full topic](https://discuss.ocaml.org/t/ann-json-data-encoding-0-9/7157)._
