Re:Erik Naggum's XML Rant from 2002: Disturbingly prescient
by raverbashing on Saturday May 05, 2012 @01:03PM
(#3932572)
"Except that in JSON, strings need to be surrounded by double quotes"
This is a funny limitation, since JSON came from Javascript and {a:1} is perfectly legal in Javascript
"Why impose on human readers a syntactic requirement that only compilers/interpreters need?"
Well, for human readers this can be bad, but <> can be bothersome as well.
YAML could be a better choice (or something similar to JSON but with better syntax)
Re:Erik Naggum's XML Rant from 2002: Disturbingly prescient
by mkmcdonald on Saturday May 05, 2012 @01:42PM
(#3932670)
> This is a funny limitation, since JSON came from Javascript and {a:1} is perfectly legal in Javascript.
That's only legal when the key is not a reserved word. I never use that form, as it's error-prone.
Except that in JSON, strings need to be surrounded by double quotes. Why impose on human readers a syntactic requirement that only compilers/interpreters need?
From this respect, JSON is in the same mixed bag as XML is.
If you want to go down that slope, be consistent and push YAML instead of JSON.