I'm personally doing something similar in a C++ project that I'm working on. I designate comments with a //. When I load the JSON file, I go line by line removing comments as I find them. Once the file is parsed you can feed it into any regular JSON parser (personally I'm a fan of https://github.com/nlohmann/json).
Using JSMin would have been a much better idea. At this point though the only downside is that I haven't yet done this for saving JSON. It's a harder problem but I don't see why it wouldn't also be doable.
edit: Apparently this library allows you to have comments, and will even preserve them when saving the JSON file.
Re:Toml: Tom's Obvious, Minimal Language
by frumiousirc on Saturday July 14, 2018 @08:18AM
(#17530022)
You could use libjsonnet++ instead of a custom reader to gain the extension of using comments. Of course, Jsonnet is a gateway drug to a much more sophisticated superset of JSON.
It is apparently possible to include, and then remove them before usage apparently but I've never tried.
[0]: https://plus.google.com/+DouglasCrockfordEsq/posts/RK8qyGVaG...