Hacker News new | ask | show | jobs
by tn13 3715 days ago
This appears to be something in between of JSON and Protocol buffers. I wonder under what conditions Ion makes more sense than either of the JSON/PBuff.
2 comments

One significant advantage is you can opt-in to sharing schemas - without requiring all consumers to have your schema. Like a lot of Amazon's internal data formats, Ion designed to support backwards compatible schemas as well (that is, adding additional fields does not break existing consumers).

It has isomorphic text and binary representations as part of the standard making debugging or optimized transport a config option.

The type system is significantly richer than JSON and maps well to several languages (internally Amazon uses it with C, C++, Perl, Java, Ruby, etc.).

S-Expressions.

> without requiring all consumers to have your schema

Then how is the client supposed to handle the data? Guessing?

> backwards compatible schemas

> text and binary representations

> type system

> maps well to several languages

Protos have all these.

> S-Expressions

Okay? Is that useful?

>> S-Expressions >>Okay? Is that useful

Yes, super useful. Depends on how your application needs to use S-expressions. You could define DSLs for a very expressive and complex rules-engine with S-Expressions forming your rules. Now you can write your rules as text, pass it around and build rule evaluators of those expressions all on top of Ion.

> Okay? Is that useful?

I bet it's super useful if you have sexprs in your data.

It's interesting to have languages written for and in the same specification as your data.
I would guess protocol buffers is obviously more useful since it has been ported to several languages already.