loading...

re: Hello XML, My Old Friend; I've Come To Encode You Again. VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Quick couple of comments: 1) JSON has no standardized way of expressing type information for each node (XML has named tags for that). Some conve...
 

By "standard" I simply mean what the language supports on its own - not how you use it. In that regard, JSON has objects, arrays and properties. Nothing more, nothing less. XML has the concept of an identifier built natively into the language. Also, it is not uncommon to see an element reference another one by means of an XPath expression within the XML document itself. Yes, JSON can emulate all of that, no doubt about it, but I rarely ever encounter such cases in practice. I assume that people simply try to avoid these scenarios when working with JSON, or switch to a different format when they are inevitable. Even as a data interchange format, JSON does have its limitations. As a Java programmer, I would much rather work with XML, but in the web world, I guess that JavaScript devs prefer JSON.

I agree that using .json for the package configuration was not a very smart decision ;-) That's exactly what I meant with "enjoy responsibly".

One advantage that JSON definitly has over XML is that it is much easier to write manually than XML, and also more lightweight to read. I never worked with YAML so far, but it seems like a middle ground between XML and JSON.

code of conduct - report abuse