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