Some data formats are easy for humans to read but difficult for computers to efficiently parse. Others, like packed binary data, are dead simple for computers to parse but borderline impossible for a human to read.
XML bucks this trend and bravely proves that data formats do not have to be one or the other by somehow managing to be bad at both.
Strong competition from yaml and json on this point however
JSON not supporting comments is a human rights violation
I mean, it’s not wrong…
deleted by creator
{ "key": "six", "value": 6, "comment": "6 is a bad number. Use five." }
deleted by creator
IMHO: XML is a file format, JSON is a data transfer format. Reinventing things like RSS or SVG to use JSON wouldn’t be helpful, but using XML to communicate between your app’s frontend and backend wouldn’t be either.
[This comment has been deleted by an automated system]
Of course you can use XML that way, but it is unnecessarily verbose and complex because you have to make decisions, like, whether to store things as attributes or as nested elements.
I stand by my statement that if you’re saving things to a file you should probably use XML, if you’re transferring data over a network you should probably use JSON.
deleted by creator
And there are some truly magic tools.
XSDs are far from perfect, but waaay more powerful than json schema.
XSLT has its problems, but completely transforming a document to a completely different structure with just a bit of text is awesome. I had to rewrite a relatively simple XSLT in Java and it was something like 10 times more lines.
[This comment has been deleted by an automated system]
People may hate on SOAP but I’ve never had issues with setting up a SOAP client
deleted by creator
That’s my biggest peev about JSON actually. No comments!! WTH!
There’s comments in the specs and a bunch of parsers that actually inore //
[This comment has been deleted by an automated system]
json spec draft 7
deleted by creator