mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-26 18:51:04 +08:00
adjust some codes position
This commit is contained in:
parent
7924d3ff97
commit
3c32dca892
@ -1454,18 +1454,18 @@ bool OurReader::readObject(Token& token) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
Token colon;
|
||||
if (!readToken(colon) || colon.type_ != tokenMemberSeparator) {
|
||||
return addErrorAndRecover("Missing ':' after object member name", colon,
|
||||
tokenObjectEnd);
|
||||
}
|
||||
if (name.length() >= (1U << 30))
|
||||
throwRuntimeError("keylength >= 2^30");
|
||||
if (features_.rejectDupKeys_ && currentValue().isMember(name)) {
|
||||
String msg = "Duplicate key: '" + name + "'";
|
||||
return addErrorAndRecover(msg, tokenName, tokenObjectEnd);
|
||||
}
|
||||
|
||||
Token colon;
|
||||
if (!readToken(colon) || colon.type_ != tokenMemberSeparator) {
|
||||
return addErrorAndRecover("Missing ':' after object member name", colon,
|
||||
tokenObjectEnd);
|
||||
}
|
||||
Value& value = currentValue()[name];
|
||||
nodes_.push(&value);
|
||||
bool ok = readValue();
|
||||
|
Loading…
x
Reference in New Issue
Block a user