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.
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.
https://github.com/open-source-parsers/jsoncpp