Skip to content

bug parse invalid json? #39

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

Closed
pavel-pimenov opened this issue Sep 11, 2014 · 3 comments
Closed

bug parse invalid json? #39

pavel-pimenov opened this issue Sep 11, 2014 · 3 comments

Comments

@pavel-pimenov
Copy link
Contributor

Json::Value root;
Json::Reader reader;
const bool parsingSuccessful = reader.parse("404 Not Found", root);

parsingSuccessful == true !

p.s.
http://jsonlint.com/

Parse error on line 1:
404 NotFound
^
Expecting '{', '['

@Xiao-Chong
Copy link

Please use
Json::Reader reader(Json::Features::strictMode());
then it will return false

@pavel-pimenov
Copy link
Contributor Author

tnx

@cdunn2001
Copy link
Contributor

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

3 participants