PPX for JSON deserialization/serialization

We have recently published (yet another) JSON Deserializer.

However I’ve always been uncomfortable with the idea of not being able to derive the deserializer from the return type, or viveversa: build the type from the fields structure.

Recently I found that PPX are kind of the macro system for OCaml. I’m wondering if there’s already a PPX based solution for JSON deser (with similar goals to Rust serde); or even if PPX is the right about it. (I’m still learning basic OCaml, so PPX are still a little ahead).

1 Like

There’s ppx-spice, also I’m going to add opt-in PPX support for rescript-struct in the near future.

2 Likes