mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-29 05:36:39 +00:00
Add error message when invalid JSON is provided
Add error message when invalid JSON is provided (#13515)
This commit is contained in:
parent
0444dfe35a
commit
9a66687085
@ -570,7 +570,10 @@ bool Ade7880SetDefaults(const char* json) {
|
||||
memcpy(json_buffer, json, len); // Keep original safe
|
||||
JsonParser parser(json_buffer);
|
||||
JsonParserObject root = parser.getRootObject();
|
||||
if (!root) { return false; }
|
||||
if (!root) {
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("A78: Invalid JSON"));
|
||||
return false;
|
||||
}
|
||||
|
||||
// All parameters are optional allowing for partial changes
|
||||
JsonParserToken val = root[PSTR("freq")];
|
||||
|
Loading…
x
Reference in New Issue
Block a user