Hacker News new | ask | show | jobs
by jerf 4491 days ago
Yes, that's what I mean. Both XML and JSON can ultimately encode everything, but they both do indeed have strengths over the other. The problem with XML isn't that it is a "bad thing" that should never be used, the problem is that it become trendy and people started using it for all sorts of things it shouldn't have been, combined with a healthy dose of it being used by a lot of people who didn't even understand XML. (XML isn't that complicated, but there's more to it that "tags, attributes, and text".) When you're in a domain where XML really should be used, you're going to regret trying to jam JSON into that domain.

Also, side observation, that Lisp-like encoding is pretty icky as-is (deciding if something is a tag or text by how deep the array is?), and gets worse if the XML uses attributes.

1 comments

I think the various XML Schema-ifications don't help either. XML is fairly poorly defined while JSON is pretty precise. This has more to do with a heavy industry of poorly defined, implied semantics atop XML than anything about the raw format, though.