Re:15 years trying to make everyone separate HTML, JavaScrip...
by tracker1 on Thursday December 22, 2016 @07:27AM
(#13236777)
But that's not concrete without another definition in place
Could represent the same object structure, for example. JSON is a pretty clean mapping to objects/properties/arrays, with less chance of confusion, or alternate interpretations.
[ Parent
| on HN ]
Re:15 years trying to make everyone separate HTML, JavaScrip...
by sly010 on Monday January 02, 2017 @12:27PM
(#13302646)
It couldn't. That would mean a different thing and would be the abuse of what XML should be used for.
Whether something is inside an element or is a property of said element has important semantical meaning. But not just that, with XML you can implicitly represent ordering, whitespace and type information with much less boilerplate.
So the argument for JSON is basically boils down to: "Javascript has horrible type support and doesn't support OOP. JSON models that experience better."