top | item 3912828

(no title)

burgerbrain | 14 years ago

I have a hard time believing that the removal of comments would greatly simplify a JSON parser.

discuss

order

mturmon|14 years ago

There would have been demands for tools that transform JSON to JSON, or JSON to XML, to preserve comments across the transformation.

Adding that capability would raise the complexity of the parser, because comments would have to be made part of the data structure that is built and transformed. For instance, it would be harder to embed the data structure for the JSON in JS objects.

But yes, for a parser that's ingesting data for immediate processing and has no need for comments, there's no discernable win regarding parsing simplicity.