Allow using a JsonVariant as a key or index

Closes #2080
This commit is contained in:
Benoit Blanchon committed 2024-05-14 21:06:02 +02:00
1 parent 071f718473
commit 68a13117dc
26 files changed
+393 -34

No files matched your search

+6
View File
@@ -80,4 +80,10 @@ TEST_CASE("JsonObject::remove()") {
JsonObject unboundObject;
unboundObject.remove(unboundObject.begin());
}
SECTION("remove(JsonVariant)") {
obj["key"] = "b";
obj.remove(obj["key"]);
REQUIRE("{\"a\":0,\"c\":2,\"key\":\"b\"}" == doc.as<std::string>());
}
}