jm + jsmin   1

JSON originally had comments. They were removed
Oh christ. This is some terrible logic from Douglas Crockford:

Comments in JSON (Apr 30, 2012)

I removed comments from JSON because I saw people were using them to hold parsing directives, a practice which would have destroyed interoperability. I know that the lack of comments makes some people sad, but it shouldn't.

Suppose you are using JSON to keep configuration files, which you would like to annotate. Go ahead and insert all the comments you like. Then pipe it through JSMin before handing it to your JSON parser.


I've never even _heard_ of JSMin. Meanwhile various tools which chose to use JSON as a configuration file format work around this crappy decision with messy hacks.
hacks  json  bad-decisions  design  apis  configuration  file-formats  javascript  douglas-crockford  fail  jsmin  parsing  comments 
16 days ago by jm

Copy this bookmark:



description:


tags: