I found this:
http://msgpack.org/
But.. I’ve never used it, so I don’t know what whether it is much good. Anybody has proposals?
Basic requirements:
- serialize as many data structures used typically in both languages as possible, have no problem with nesting
- as reliable/unbuggy as possible
- high performance is nice to have, but not critical
- as simple as possible to use, but not simpler
5
I can’t speak for that msgpack you linked, but the haskell usage looks quite simple and it sounds performant, I would definitely give it a shot until I found it inadequate.
Also there is protobuff which is a great protocol and haskell has a lib for it here:
http://hackage.haskell.org/package/hprotoc
Alternatively you can always just use a more common serialization format: JSON is well supported on both sides.
If you are familiar with Attoparsec, and have a limited object structure you want to send back and forth, you could write your own Attoparsec parser in very quickly on the haskell side, but if it needs to go the other way too you would then have to do similar on Python which would take a lot more work.
I would generally avoid hand-writing this though if it were me, JSON is well supported and protobuff is a good standard as well (though I’ve not used it in Haskell so I can’t vouch for the quality of it’s APIs in Haskell)