Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove comments in JSON files for boost 1.59 (ptree removed support) #1689
I will note that having comments to explain what a query does, why it's there, etc. is super-useful. My vote is actually for keeping these, possibly by including a preprocessor that strips them on load? This library does a cool thing which replaces comments with whitespace, so the error locations (if any) are still correct.
I ported over the code from the above library to C++ pretty quickly today - see it here: https://github.com/andrew-d/json-strip
I'm pretty busy for the rest of the week, though, so I'm not sure I'll have the time to get to actually putting this in a PR - if anyone else does before me, let me know. It probably also needs tests - the code was written pretty quickly.