5 ms·
Isn't that what we want? I would think that solving the same problems for a less verbose format is a good thing. And looking at the examples and the library sup
by hliyan 9y ago
Isn't that what we want? I would think that solving the same problems for a less verbose format is a good thing. And looking at the examples and the library support (http://jmespath.org/libraries.html http://jmespath.org/libraries.html) I would say this solves a real problem. I can already think of several use cases for my own system.
The fact that a solution is treading familiar ground does not invalidate its utility.
- Finnucane 9y agoIt's not very much less verbose, really. You still need a key and a value. The only thing you lose, really, is the end tag. For a complex text document in say TEI or Docbook, I don't see how this is much of an advantage.
- humanrebar 9y agoIt's less complex since there aren't attributes. Of course, if you like attributes, then that's a downside.
- Finnucane 9y agoYou could have attributes, they just need to be another nested object. This makes a mess, though.
- titanix2 9y agoNo, you also loose the attribute system and thus the ability extend existing elements without changing their structure. In addition, arrays must be indicated clearly in JSON while you can consider children of an xml nodes to always form a list (be it empty or containing one element). So while the two format are very similar, there is still some differences that doesn’t make them interchangeable for every usecase.
- jelder 9y agoThe reason I prefer JSON over XML is the latter's ambiguity. It's completely obvious how to convert a native object into a JSON object, for example. The translation to XML brings all sorts of questions about when to use tags vs. attributes of tags. It's cognitive load I'd rather spend on solving the problem at hand, not serialization. If there had been an opinionated SGML syntax which mapped directly and unambiguously to common language primitives and back, I'm sure it would have been more popular than JSON.
- JetSpiegel 9y agoIf your JSON is so complex it need a schema, doesn't XML extra structure help?
- k6k7f7uky8ki 9y agoHow would the extra structure help?
- lox 9y agoTry implementing an xml parser sometime. The encoding and entity parsing alone is so complicated it’s brain melting. Compare that to the JSON spec and then ask why the world has decided JSON is the better format for casual object graph encoding. Not sure I could make the same argument about YAML though.