mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-22 16:58:11 +08:00
@@ -1068,7 +1068,7 @@ bool OurReader::parse(const char* beginDoc,
|
|||||||
Token token;
|
Token token;
|
||||||
skipCommentTokens(token);
|
skipCommentTokens(token);
|
||||||
if (features_.failIfExtra_) {
|
if (features_.failIfExtra_) {
|
||||||
if (token.type_ != tokenError && token.type_ != tokenEndOfStream) {
|
if ((features_.strictRoot_ || token.type_ != tokenError) && token.type_ != tokenEndOfStream) {
|
||||||
addError("Extra non-whitespace after JSON value.", token);
|
addError("Extra non-whitespace after JSON value.", token);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user