in reply to Re: Contextual find and replace large config file
in thread Contextual find and replace large config file

> Note that JSON doesn't support comments, which is probably the biggest complaint about it as a configuration file format.

I never noticed this - most probably because I never came into a situation to need it.

What's surprising me, is that JSON historically started as eval'ed JS object, so why did they skip the comment feature?

Especially since CSS inherited JS comments too.

So I did some research to find out that Douglas Crockford disabled it deliberately, because he wanted to prevent people from hiding data there. ...

... well, Douglas again. :/

Anyway, for config purpose I'd try split up the data into multiple JSON chunks and comment them, or resort to YAML, which allows JSON as subset.

--- # Comment { "name": "John Smith", "age": 33 }

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice