Store object members with two slots: one for the key and one for the value

This commit is contained in:
Benoit Blanchon
2024-08-24 10:45:51 +02:00
parent a2b09bfbd2
commit 09c89dcacf
24 changed files with 229 additions and 173 deletions
+2 -2
View File
@@ -308,12 +308,12 @@ TEST_CASE("deserialize JSON object") {
REQUIRE(doc["a"] == 2);
}
SECTION("NUL in keys") { // we don't support NULs in keys
SECTION("NUL in keys") {
DeserializationError err =
deserializeJson(doc, "{\"x\\u0000a\":1,\"x\\u0000b\":2}");
REQUIRE(err == DeserializationError::Ok);
REQUIRE(doc.as<std::string>() == "{\"x\":2}");
REQUIRE(doc.as<std::string>() == "{\"x\\u0000a\":1,\"x\\u0000b\":2}");
}
}