logoalt Hacker News

ACCount37today at 1:45 PM1 replyview on HN

"Any serious usage" starts at "it just works".

JSON just works. Every language worth giving a damn about has a half-decent parser, and the syntax is simple enough that you can write valid JSON by hand. You wouldn't hit the edgy edge cases or the need to use things like schemas until down the line, by which point you're already rolling with JSON.

XML doesn't "just work". There are like 4 decent libraries total, all extremely heavy, that have bindings in common languages, and the syntax is heavy and verbose. And by the time you could possibly get to "advanced features that make XML worth using", you've already bounced off the upfront cost of having to put up with XML.

Frontloading complexity ain't great for adoption - who would have thought.


Replies

phlakatontoday at 2:47 PM

> JSON just works.

Until it doesn't: underspecified numeric types and string types; parses poorly if there's a missing bracket; no built-in comments.

For many applications it's fine. I personally think it's a worse basis for a DSL, though.

show 1 reply