by willvarfar · 6y ago · 0 comments
It’s roughly the same vintage as protobuf and thrift, from google and Facebook respectively, so perhaps it’s just Amazon’s equivalent, which they just never released as quick as the others did?
Obvious pros and cons, or yet another serialization format with no obvious benefits over anything else?
vs. protobuf: ion is self describing, vs needing a schema
vs. thrift: similar, thrift needs a schema to interpret a binary file
both thrift and protobuf are really binary formats, though they have a canonical textual representation, it's not actually used to serialize. Sounds like ion supports serializing as text as a first class concept.
vs. msgpack: ion has a corresponding text format, whereas msgpack is only binary. Additionally, ion has a symbol type, msgpack doesn't.
I think the biggest benefit here is that it's a new chance for a format that fixes some of json's rough edges to gain critical mass. There's probably nothing ultra special about it that hasn't been solved in other formats, but maybe the timing will be right and everyone will just adopt it as a json replacement (sort of how people just gave up on xml and switch to json seemingly overnight). It's impossible to predict stuff like that.
Edit: upon noticing that it was released in 2016, it seems less likely everyone will jump on the ion bandwagon ...
1) timestamp : I have had issues with a round-tripping timestamp representation quite a bit 2) decimal : currency is denoted in decimal rather than float and shows the Amazon retail heritage. This is very useful. 3) symbols : I've had cases where symbol table/dictionary would have made big difference in serialized size
https://github.com/tlocke/zish
It has timestamps and decimals. Full disclosure, I am the author.
Ion is directly comparable to JSON/MessagePack/BSON/CBOR.
I would expect Ion will have slightly different time/space tradeoffs than the other binary schemaless formats.