3 ms·
I, too, would love to see comments officially supported in the next iteration of the JSON standard...IIRC, Crockford removed them to make JSON a valid YAML subs
by kitcambridge 15y ago
I, too, would love to see comments officially supported in the next iteration of the JSON standard...IIRC, Crockford removed them to make JSON a valid YAML subset.
For what it's worth, I've created a fork of Kyle Simpson's `JSON.minify` project that uses a variation of the character-based parsing process in JSON 3: https://github.com/kitcambridge/JSON.minify/blob/master/minify-sans-regexp.js https://github.com/kitcambridge/JSON.minify/blob/master/mini... It's somewhat cumbersome to use, though, as it needs to be called on a string before feeding it to `parse` (e.g., `JSON.parse(JSON.minify("/* Hello */ 123"))`).