dropbox / json11

A tiny JSON library for C++11.
MIT License
2.54k stars 613 forks source link

Improve comment error handling #102

Closed artwyman closed 7 years ago

artwyman commented 7 years ago

Improve handling of errors in comments, and make comment tests self-checking.

This fixes a bug where trailing inline comments were rejected, and also several cases where comment parsing would fail, but the overall parser would return a non-null value.

I'm soliciting review from @j4cbo and @capitalaslash before I merge this. Fixes #101. Thanks @mfzhu7 for reporting.

artwyman commented 7 years ago

Updated to cover the missed case @j4cbo pointed out.

j4cbo commented 7 years ago

LGTM. (Not merging yet to let other reviewers comment)