Remove pointer reference to JsonObject calls. (#2294)

This commit is contained in:
gb53smith 2022-11-12 22:39:00 -08:00 committed by GitHub
parent 8dc2229187
commit e7ba602c29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,7 +157,7 @@ custom components that communicate using MQTT.
publish("the/other/topic", 42);
}
}
void on_json_message(JsonObject &root) {
void on_json_message(JsonObject root) {
if (!root.containsKey("key"))
return;
@ -165,7 +165,7 @@ custom components that communicate using MQTT.
// do something with Json Object
// publish JSON using lambda syntax
publish_json("the/other/json/topic", [=](JsonObject &root2) {
publish_json("the/other/json/topic", [=](JsonObject root2) {
root2["key"] = "Hello World";
});
}