2 ms·
I don't really understand your point here. Those JSON data dumps don't make any sense...and wouldn't make sense as XML either. Why wouldn't you enforce a schema
by Yarnage 14y ago
I don't really understand your point here. Those JSON data dumps don't make any sense...and wouldn't make sense as XML either. Why wouldn't you enforce a schema? I've never worked on a system that didn't do validation and schema enforcement regardless of xsd, json, etc; you need to have well defined ways of laying out your data or it's going to be useless regardless of the format used.
>JSON is great, but it is not nearly as flexible as XML, partly because of attributes.
Attributes can be stored in JSON as well. XML and JSON simply store data in different ways.
>Also, because of it's JS heritage and compatibility, lots of common things are not representable in JSON.
Like what? You can actually put real values in their correct types with JSON. You can't do that with XML, so what types of items are not representable?
>This is mostly because object keys MUST be strings.
The same is true for XML so I'm not sure what your point is. Don't nodes and attribute names need to be strings in XML?