Time to read this if you haven’t already
Time to read this if you haven’t already
The json spec is not versioned. There were two changes to it in 2005 (the removal of comments
See, this is why we can’t have nice things.
They’re not supposed to contain data, but some parsers will allow you to access what’s written into comments. And so, of course, someone made use of that and I had to extract what was encoded basically like that:
<!-- Host: toaster, Location: moon, --> <data>Actual XML follows...</data>My best guess is that they added this data into comments rather than child nodes or attributes, because they were worried some of the programs using this XML would not be able to handle an extension of the format.
Their stated justification is that people would abuse comments, using them to carry semantic or syntactic information. That’s a shit justification IMO.
As far as the additional complexity that comments bring, I understand that from a technical perspective but from an engineering-for-real-humans-in-the-real-world perspective that’s the kind of thing you just have to deal with if you want to design a good format.