We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 527332d commit 62ad140Copy full SHA for 62ad140
src/lib_json/json_reader.cpp
@@ -1432,6 +1432,11 @@ bool OurReader::readObject(Token& tokenStart) {
1432
"Missing ':' after object member name", colon, tokenObjectEnd);
1433
}
1434
if (name.length() >= (1U<<30)) throw std::runtime_error("keylength >= 2^30");
1435
+ if (features_.rejectDupKeys_ && currentValue().isMember(name)) {
1436
+ std::string msg = "Duplicate key: '" + name + "'";
1437
+ return addErrorAndRecover(
1438
+ msg, tokenName, tokenObjectEnd);
1439
+ }
1440
Value& value = currentValue()[name];
1441
nodes_.push(&value);
1442
bool ok = readValue();
0 commit comments