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

Parsing of trailing data #1547

Open
j-moeller opened this issue Jul 3, 2024 · 1 comment
Open

Parsing of trailing data #1547

j-moeller opened this issue Jul 3, 2024 · 1 comment

Comments

@j-moeller
Copy link

Describe the bug
jsoncpp parses trailing commas and ignores trailing garbage which is (technically) not in accordance with the JSON grammar.

To Reproduce
We created a minimum working sample here.

Expected behavior
jsoncpp should abort parsing when encountering a trailing comma or when (trailing) input is left after the parsing attempt.

@daudrain
Copy link

daudrain commented Dec 1, 2024

@j-moeller,

by default, CharReaderBuilder accepts trailing comma.
You may consider invoking char_reader_builder.strictMode(&char_reader_builder.settings_) to disable this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants