Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
> 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.
Cheers Rolf
In reply to Re^2: Contextual find and replace large config file
by LanX
|
|