-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
[]An error has occurred.
Jsoncpp strict mode is able to parse above input.
This is invalid json but somehow passed by latest jsoncpp code till "]". It is not considering input after "]".
Sample code :
int main()
{
Json::Value root;
ifdef STRICT
Json::Reader reader(Json::Features::strictMode());
else
Json::Reader reader;
endif
std::ifstream file("test_now.json");
bool parsingSuccessful = reader.parse(file, root);
if(!parsingSuccessful)
{
cout << "Failed to parse configuration. " << reader.getFormatedErrorMessages();
return 0;
}
else
cout << "Pretty-Print: " << root.toStyledString() << endl;
}
Output with all & strict mode:
./all
Pretty-Print: []
./strict
Pretty-Print: []
Metadata
Metadata
Assignees
Labels
No labels