added a test whether we have reach the end of the input string
without this such an input json (incorrect json string as there is no {} characters): "key": "value" would be parsed correctly: "key" would be parsed and the rest would be skipped
This commit is contained in:
@@ -323,6 +323,11 @@ void SpaceParser::ParseRootSpace()
|
||||
Parse(root_space, false, false);
|
||||
}
|
||||
|
||||
SkipWhite();
|
||||
|
||||
if( lastc != -1 )
|
||||
status = syntax_error;
|
||||
|
||||
token.clear();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user