-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strip comments / Minify #294
Comments
For this library, we do not plan to support any input which is not compliant to RFC 7159. |
That's fine! I think I'll just write a spirit parser to match and strip |
You could edit file src/json.hpp.re2c. It contains a re2c lexer (see function basic_json::lexer::scan) and all you would need to do is to add a regex for comments like |
While comments are not part of JSON, some people (particularly those writting JSON files by hand sometimes add comments to them). That makes those files not JSON anymore. The typical solution when one wants to process one of those files as JSON is to "minify" them first.
Is it possible to strip comments / minify json files before parsing them as json?
The text was updated successfully, but these errors were encountered: