jsoncpp
jsoncpp copied to clipboard
Parsing of trailing data
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.
@j-moeller,
by default, CharReaderBuilder accepts trailing comma.
You may consider invoking char_reader_builder.strictMode(&char_reader_builder.settings_) to disable this behavior.