mirror of
https://github.com/s00500/ESPUI.git
synced 2024-11-17 00:20:54 +00:00
Update key verification syntax
Resolve deprecation warnings for changes in ArduinoJson. See: https://arduinojson.org/v7/api/jsondocument/containskey/
This commit is contained in:
parent
8c729ee0da
commit
c42c40d881
@ -310,14 +310,14 @@ uint32_t ESPUIclient::prepareJSONChunk(uint16_t startindex,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!FragmentRequest.containsKey(F("id")))
|
if(!FragmentRequest["id"].is<JsonVariant>())
|
||||||
{
|
{
|
||||||
Serial.println(F("ERROR:prepareJSONChunk:Fragmentation:Request does not contain a control ID"));
|
Serial.println(F("ERROR:prepareJSONChunk:Fragmentation:Request does not contain a control ID"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
uint16_t ControlId = uint16_t(FragmentRequest[F("id")]);
|
uint16_t ControlId = uint16_t(FragmentRequest[F("id")]);
|
||||||
|
|
||||||
if(!FragmentRequest.containsKey(F("offset")))
|
if(!FragmentRequest["offset"].is<JsonVariant>())
|
||||||
{
|
{
|
||||||
Serial.println(F("ERROR:prepareJSONChunk:Fragmentation:Request does not contain a starting offset"));
|
Serial.println(F("ERROR:prepareJSONChunk:Fragmentation:Request does not contain a starting offset"));
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user