Skip to content
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

Add option to ignore comments in parse/accept functions #2212

Merged
merged 7 commits into from
Jun 27, 2020
Merged

Conversation

nlohmann
Copy link
Owner

@nlohmann nlohmann commented Jun 23, 2020

This PR adds an option ignore_comments to the parse and accept family that allows to ignore // and /* */ style comments.

PS: I still think there is a good reason JSON has no comment support. But it was by far the most popular request, and I understand that the lack of comments was a problem for a lot of folks that use JSON as configuration format. However, comments are still treated as parse error by default.

Closes #2061
Closes #1513
Closes #597
Closes #376
Closes #363
Closes #294

Related to #2090 #348 (comments only, no full JSON5 support).
Related to #311 (comments only, no JSON Schema support)

@nlohmann nlohmann self-assigned this Jun 23, 2020
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 65e8ee9 on comments into 8575fdf on develop.

@nlohmann nlohmann added this to the Release 3.8.1 milestone Jun 27, 2020
@nlohmann nlohmann merged commit 3948b5b into develop Jun 27, 2020
@nlohmann nlohmann deleted the comments branch June 27, 2020 10:44
@nlohmann
Copy link
Owner Author


🔖 Release item

This issue/PR will be part of the next release of the library. This template helps preparing the release notes.

Type

  • ✨ New Feature
  • 🐛 Bug Fix
  • ⚡️ Improvement
  • 🔨 Further Change
  • 🔥 Deprecated function

Description


@gregmarr gregmarr mentioned this pull request Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants