Finally! I've had to live the JSON nightmare since I left Amazon. Some of the benefits over JSON: * Real date type * Real binary type - no need to base64 encode * Real decimal type - invaluable when working with currency * Annotations - You can tag an Ion field in a map with an annotation that says, e.g. its compression ("csv", "snappy") or its serialized type ('com.example.Foo'). * Text and binary format * Symbol ta…
Okay, but they did a really poor job marketing it in this release. Plus, if it's used within Amazon, why it's Java-only so far?
Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset
111–120 of 174 posts
Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset
#112Finally! I've had to live the JSON nightmare since I left Amazon. Some of the benefits over JSON: * Real date type * Real binary type - no need to base64 encode * Real decimal type - invaluable when working with currency * Annotations - You can tag an Ion field in a map with an annotation that says, e.g. its compression ("csv", "snappy") or its serialized type ('com.example.Foo'). * Text and binary format * Symbol ta…
Okay, but they did a really poor job marketing it in this release. Plus, if it's used within Amazon, why it's Java-only so far?
Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset
#113Earlier quoted context omitted.
Real decimal type - invaluable when working with currency What does JavaScript do with this though, just cast it to a float?
The real way is: "price": { "amount": "1500", "scale": 2, "symbol": "GBP", } Currency has 3 properties, the amount, scale, and symbol. Amount is a string, it holds a bigint. Yes, it's a string. The value of Scale can be up to 5 but is usually 2 or 3. Symbol is the ISO code. Whenever I see a financial system that uses "amount": 15.00 I know that the system is ill-conceived.
Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset
#114I Consider this Harmful (TM) and will oppose the adoption in every organization where I have an opportunity to voice such. (In its present form, to be clear!) There is no need to have a null which is fragmented into null.timestamp, null.string and whatever. It will complicate processing. Just because you know the type of some element is timestamp, you must worry whether or not it is null and what that means. There sh…
Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset
#115Is there a source for benchmarks/reviews for the various ways to represent data? As far as I see it, there are a lot of them that I'd like to hear pros/cons for: json, edn + transit (my fave), yaml, google protobufs, thrift (?), as well as Ion. And where does Ion fit here?
Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset
#116Earlier quoted context omitted.
I don't get this gripe with XML, it is meant to be used by tools not to be written by hand. Where is the XPath and XQuery for JSON? Do people really think that manually iterating over the whole JSON document to find the data or writing yet another parser, is better?
http://jmespath.org/
Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset
#117To think about the difference between serialization formats, here's an analogy I hope will help. Protocol Buffers (and I think Thrift, and maybe Avro) are sort of like C or C++: you declare your types ahead of time, and then you take some binary payload and "cast" it (parse it actually) into your predefined type. If those bytes weren't actually serialized as that type, you'll get garbage. On the plus side, the fact t…
I officially propose to use the term "accidentally typed" or "eventually typed".
Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset
#118Earlier quoted context omitted.
The real way is: "price": { "amount": "1500", "scale": 2, "symbol": "GBP", } Currency has 3 properties, the amount, scale, and symbol. Amount is a string, it holds a bigint. Yes, it's a string. The value of Scale can be up to 5 but is usually 2 or 3. Symbol is the ISO code. Whenever I see a financial system that uses "amount": 15.00 I know that the system is ill-conceived.
What's the scale in this context? Your explanation doesn't really clarify.
So to convert the value back into the currency range, you're supposed to compute "amount / 10^scale".
Re: Amazon open-sources Ion – a binary and text interchangable, typed JSON-superset
#119Earlier quoted context omitted.
Okay, but they did a really poor job marketing it in this release. Plus, if it's used within Amazon, why it's Java-only so far?
Amazon's mainly a Java shop, not sure if that helps you.