Util: Fix empty Object {} parsing
This commit is contained in:
@@ -393,7 +393,7 @@ Value Parser::getObject()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
token = peek();
|
token = consume();
|
||||||
if (token.type == Token::Type::BraceClose) {
|
if (token.type == Token::Type::BraceClose) {
|
||||||
// Trailing comma
|
// Trailing comma
|
||||||
if (object.asObject().size() > 0) {
|
if (object.asObject().size() > 0) {
|
||||||
@@ -408,6 +408,7 @@ Value Parser::getObject()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find member name
|
// Find member name
|
||||||
|
m_index--;
|
||||||
Value tmpName = getString();
|
Value tmpName = getString();
|
||||||
if (tmpName.type() != Value::Type::String) {
|
if (tmpName.type() != Value::Type::String) {
|
||||||
seekForward(Token::Type::BraceClose);
|
seekForward(Token::Type::BraceClose);
|
||||||
|
|||||||
Reference in New Issue
Block a user