We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d253c19 commit 91333c5Copy full SHA for 91333c5
1 file changed
src/IotWebConfTParameter.h
@@ -53,6 +53,28 @@ class ConfigItemBridge : public ConfigItem
53
out->println("'");
54
}
55
56
+#ifdef IOTWEBCONF_ENABLE_JSON
57
+ void loadFromJson(JsonObject jsonObject)
58
+ {
59
+ if (jsonObject.containsKey(this->getId()))
60
61
+# ifdef IOTWEBCONF_DEBUG_TO_SERIAL
62
+ Serial.print(F("Applying value from JSON for parameterId: "));
63
+ Serial.println(this->getId());
64
+# endif
65
+ const char* value = jsonObject[this->getId()];
66
+ this->update(String(value));
67
+ }
68
+ else
69
70
71
+ Serial.print(F("No value found in JSON for parameterId: "));
72
73
74
75
76
+#endif
77
+
78
protected:
79
ConfigItemBridge(const char* id) : ConfigItem(id) { }
80
virtual int getInputLength() { return 0; };
0 commit comments