I liked this CBOR vs MsgPack article from a while back (which also talks about size on the wire, not just performance): https://diziet.dreamwidth.org/6568.html SBE (Simple Binary Encoding) also makes some interesting performance claims. My pet peeve with both protobuf and capnp is the lack of an option type; they seem to be designed for languages with type systems that include null, rather than more modern languages…
Better Than JSON?
21–30 of 153 posts
Re: Better Than JSON?
#22Everyone loves to hate on XML just because it can be verbose and some of the WS* protocols are complicated. But as a human-readable format it’s no harder to read or parse than JSON and legacy application support is orders of magnitude better than JSON. I’m not saying we should all use it but we shouldn’t be hating it either.
Re: Better Than JSON?
#23This made me laugh more than it probably should have.
Re: Better Than JSON?
#24Re: Better Than JSON?
#25Everyone loves to hate on XML just because it can be verbose and some of the WS* protocols are complicated. But as a human-readable format it’s no harder to read or parse than JSON and legacy application support is orders of magnitude better than JSON. I’m not saying we should all use it but we shouldn’t be hating it either.
The issue with XML is that it was mostly pushed upon developers without any deeper understanding. So there's a ton of utterly crap XML applications out there with no rhyme or reason, and these crap XML enterprise apps are most developer's understanding of "real world XML". Similar to how terrible C++ code being all over the place is making people hate C++ the language. ------- XML can be used very well however: its u…
Re: Better Than JSON?
#26Anything that lists BSON should include the fix: JSONB https://news.ycombinator.com/item?id=7457645
Re: Better Than JSON?
#27Re: Better Than JSON?
#28 > Not sure anyone really knows how XML happened. It’s
> basically the W3C’s fault, I think? It’s okay for some
> things but in the end I’m not sure it’s something anyone
> actually wants to use, it’s just going to be one more of
> those mistakes of the past.
Look, I was doing web dev when XMLRPC was in. For simple API stuff, JSON ended up being worlds better. No fiddly XML preamble, no schemas, no envelopes, just enough structure to be able to quickly pull out a couple of fields and we're set. Beautiful.But let me tell you how much I appreciated XML and schema validation when we were working with fifteen different partners all using a standardized XML format with a schema. These are cats who were putting XSDs into their IDEs, clicking generate to get a class, and then just not caring.
So when our integrations broke because they were sending XML payloads that failed schema validation, our conversations were so easy.
Before you say "yes but technically you could have done the same with $OTHER_THING" -- sure it's possible, but XML is ubiquitous. Shit, our tools were in Ruby.
XML can be a bear, but sometimes you need a bear.
Re: Better Than JSON?
#29S-expressions are the most logical representation of data structures. “CAR”/“CDR” are not a part of the expression syntax, so this argument against them won’t matter.
I didn't read that as complaining about CAR/CDR, but rather it was making a joke: the section header is "Cons".
Re: Better Than JSON?
#30Everyone loves to hate on XML just because it can be verbose and some of the WS* protocols are complicated. But as a human-readable format it’s no harder to read or parse than JSON and legacy application support is orders of magnitude better than JSON. I’m not saying we should all use it but we shouldn’t be hating it either.