Serialization via Codecs
There are generally two ways to do serialization in FP languages
- Use type classes (e.g.
purescript-argonaut-*
/simple-json
) - Use handwritten profunctor-based code (e.g.
purescript-codec-*
) - Generate codecs (type-class or value-based codecs) via
tidy-codegen
Of the two approaches, I prefer the second one, largely because of the reasons explained in Thoughts on Type Class Codecs.