Has anyone tried a bidirectional JSON serialization lib?


I’m thinking of something like https://github.com/chpatrick/codec

Sometimes deriving generic JSON instances is what you want, but there are other situations where doing it by hand is more appropriate. Then it feels wrong to write separate serialization and deserialization code.


At Monadfix we wrote jijo specifically for bidirectional JSON serialization with intelligent validation (typed errors, error paths, collecting multiple errors when possible). It was inspired by codec.


We are using https://github.com/pepeiborra/schemas (but note that it’s still in the early stages of it’s life). It does a bit more than the bidirectional serialization.


Interesting, thanks folks!