open-source-parsers / jsoncpp

A C++ library for interacting with JSON.
Other
8.06k stars 2.63k forks source link

Parsing of trailing data #1547

Open j-moeller opened 2 months ago

j-moeller commented 2 months ago

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.