[ANN] ppx_protocol_conv 5.0.0

It is my pleasure to announce the release of Ppx_protocol_conv version 5.0.0.

Ppx_protocol_conv is a syntax extension to generate functions to serialize and de-serialize ocaml types. The ppx itself does not contain any protocol specific code, but relies on user defined ‘drivers’ to define serialization and de-serialiazation of basic types and structures.

The library comes with multiple pre-defined drivers:

  • ppx_protocol_conv_json (Yojson.Safe.json)
  • ppx_protocol_conv_jsonm (Ezjson.value)
  • ppx_protocol_conv_msgpack (Msgpck.t)
  • ppx_protocol_conv_xml-light (Xml.xml)
  • ppx_protocol_conv_yaml (Yaml.value)

The library is based on ppxlib and is is compatible with base v0.12.
Release 5.0.0 is available through opam.

The project homepage is: https://github.com/andersfugmann/ppx_protocol_conv

The project’s wiki pages contains some more information on how to use the library and existing drivers and on how to write you own drivers.

Noteworthy Changes
This release includes a major rewrite of the core of the library to allow more control by user supplied drivers over the serialization and de-serialization of types. These changes breaks backward compatibility.

The json driver (Ppx_protocol_conv_json) has been updated to be compatible with the serialization format of ppx_deriving_yojson, supporting both [@key], [@name] and [@default] attributes, and can be used as a replacement for ppx_deriving_yojson with few modifications.

Deserialization functions now returns a result type. Old support for exception type errors is available in functions with the _exn suffix.
For a complete list of changes, see the Changelog.

As always, comments, suggestions and PRs are more than welcome.