Live data from Hacker News

Better Than JSON?

wiki.alopex.li

11–20 of 153 posts

Re: Better Than JSON?

#11
> Not sure anyone really knows how XML happened. It’s basically the W3C’s fault, I think?

Doesn't instill confidence in that content.

fyi: XML was subset by W3C (the SGML "extended review board" specifically) from SGML to become the generic syntax for web vocabularies (replace HTML syntax by XTHML, and define new SVG, MathML vocabularies). Didn't work out on the web, though.

Re: Better Than JSON?

#12
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 like Rust or Kotlin.

Re: Better Than JSON?

#13
post #6

Everyone 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.

Make these people debug doyne old EDI documents and all of a sudden XML doesn't seem so bad.

Re: Better Than JSON?

#14
post #2

S-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?

#15

> Not sure anyone really knows how XML happened. It’s basically the W3C’s fault, I think? Doesn't instill confidence in that content. fyi: XML was subset by W3C (the SGML "extended review board" specifically) from SGML to become the generic syntax for web vocabularies (replace HTML syntax by XTHML, and define new SVG, MathML vocabularies). Didn't work out on the web, though.

> Doesn't instill confidence in that content.

It is pretty clear by the language used that it's all written tongue in cheek.

Re: Better Than JSON?

#16
post #6

Everyone 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 use in Jabber / XMPP is clear and concise. XML Namespaces are needed due to the extensions of XMPP, and various programs can interact with the protocol. Specifications are clear, the ability to "stream" data is proven, different parser strategies have been implemented. Its clear that XML in this instance works, and works pretty well.

Re: Better Than JSON?

#17
Also worth looking are EDN [0] (mentioned briefly under S-Expressions), Transit [1] and Fressian [2][3].

[0] https://github.com/edn-format/edn

[1] https://github.com/cognitect/transit-format

[2] https://github.com/Datomic/fressian/wiki

[3] https://www.youtube.com/watch?v=JArZqMqsaB0&ab_channel=Cloju...

Re: Better Than JSON?

#18
post #6

Everyone 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.

XML's verbosity massively harms its human-readability in my opinion.

Re: Better Than JSON?

#19
post #6

Everyone 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.

Disagree--XML to me is much harder to read, if you're talking about human readable.

Re: Better Than JSON?

#20

Also worth looking are EDN [0] (mentioned briefly under S-Expressions), Transit [1] and Fressian [2][3]. [0] https://github.com/edn-format/edn [1] https://github.com/cognitect/transit-format [2] https://github.com/Datomic/fressian/wiki [3] https://www.youtube.com/watch?v=JArZqMqsaB0&ab_channel=Cloju...

Yeah, the author didn’t specify why he thought EDN wasn’t more than “a good start.” I’m curious what it’s missing!
Post reply on HN