Live data from Hacker News

ECMA-404: The JSON Data Interchange Format [pdf]

ecma-international.org

41–50 of 199 posts

Re: ECMA-404: The JSON Data Interchange Format [pdf]

#43
post #40

Earlier quoted context omitted.

Nope, sorry.

This sucks, because it limits the usability of JSON. It should interfere with its being a serialization and interchange format, but for configuration files anything without comments is useless.

https://plus.google.com/118095276221607585885/posts/RK8qyGVa...

Re: ECMA-404: The JSON Data Interchange Format [pdf]

#45
post #20

Earlier quoted context omitted.

Why do you ask him without the stubborn and arrogant comment on G+ and about trailing commas? Or is indirect better?

Trailing commas would make the problem worse! If you allow trailing commas then you would break json parsing in all old version of IE. The unicode line ending problem is more subtle. I have seen people write code like (mix javascript and some templating): var prefs = ; ... The above code looks okay, but if the json is just spec conforming, then you are exposed to a potential XSS attack. Most people that write json en…

> If you allow trailing commas then you would break json parsing in all old version of IE.

No, you would break the evaluation of json as javascript in old versions of IE.

Use a real parser already.

Re: ECMA-404: The JSON Data Interchange Format [pdf]

#47

Earlier quoted context omitted.

Trailing commas would make the problem worse! If you allow trailing commas then you would break json parsing in all old version of IE. The unicode line ending problem is more subtle. I have seen people write code like (mix javascript and some templating): var prefs = ; ... The above code looks okay, but if the json is just spec conforming, then you are exposed to a potential XSS attack. Most people that write json en…

> you would break json parsing in all old version of IE Why do people still care about old versions of IE?

They don't, it's just convenient to make their point. Pretty much any new technology isn't directly compatible with old technology.

Re: ECMA-404: The JSON Data Interchange Format [pdf]

#49
post #40

Earlier quoted context omitted.

Nope, sorry.

This sucks, because it limits the usability of JSON. It should interfere with its being a serialization and interchange format, but for configuration files anything without comments is useless.

Not really... just add a "comment" key and then ignore it when processing.
Post reply on HN