Deprecate containsKey() in favor of doc["key"].is<T>()

See #2121
This commit is contained in:
Benoit Blanchon
2024-09-06 17:32:09 +02:00
parent dd1d96e28f
commit d92eee8736
22 changed files with 263 additions and 269 deletions
-7
View File
@@ -34,13 +34,6 @@ TEST_CASE("std::string") {
REQUIRE("value"_s == obj["key"_s]);
}
SECTION("containsKey()") {
char json[] = "{\"key\":\"value\"}";
deserializeJson(doc, json);
JsonObject obj = doc.as<JsonObject>();
REQUIRE(true == obj.containsKey("key"_s));
}
SECTION("remove()") {
JsonObject obj = doc.to<JsonObject>();
obj["key"] = "value";