Skip to content

bug parse invalid json? #39

Closed
Closed
@pavel-pimenov

Description

@pavel-pimenov
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 '{', '['

Activity

Xiao-Chong

Xiao-Chong commented on Sep 11, 2014

@Xiao-Chong

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

pavel-pimenov

pavel-pimenov commented on Sep 11, 2014

@pavel-pimenov
ContributorAuthor

tnx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @cdunn2001@pavel-pimenov@Xiao-Chong

        Issue actions

          bug parse invalid json? · Issue #39 · open-source-parsers/jsoncpp