3 ms·
Do any of the popular message serialization formats have first class support for algebraic data types? It seems like every one I've researched has to be hacked
by saosebastiao 11y ago
Do any of the popular message serialization formats have first class support for algebraic data types? It seems like every one I've researched has to be hacked in some way to provide for sum types.
- QuercusMax 11y agoProtocol buffers support oneof, which is a union type. https://developers.google.com/protocol-buffers/docs/proto#oneof https://developers.google.com/protocol-buffers/docs/proto#on... (Insert joke here about Google engineers just copying around protobufs.)
- koloron 11y agoNearly the same question was recently asked in r/haskell: https://www.reddit.com/r/haskell/comments/4fhuw3/json_for_adts/ https://www.reddit.com/r/haskell/comments/4fhuw3/json_for_ad...