diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index 6167327..b354be3 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -1068,7 +1068,7 @@ bool OurReader::parse(const char* beginDoc, Token token; skipCommentTokens(token); 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); return false; }