[ANN] Ppx deriving decoders

A little late but wanted to share a package I have released!

For those familiar with the excellent ocaml-decoders package, I have written ppx_deriving_decoders to automatically generate the corresponding decoders (and encoders) based off of type definitions.

In my view, this gives the best of both worlds in terms of:

  1. automatically generating (e.g. JSON) serialization and deserialization based off of a type definition, and
  2. having a readable and expressive language for handwriting encoders and decoders when necessary by using combinators.

The instructions in the README demonstrate how you can use the generated decoder as a base point from which to hand tweak and get your own custom decoder.

Please let me know if you find it useful or have any feedback. Thanks!

2 Likes