From c42c40d8812caca4e3a7283acb4f0e90cf8f8cce Mon Sep 17 00:00:00 2001 From: joyfullservice Date: Fri, 4 Oct 2024 16:14:41 -0500 Subject: [PATCH] Update key verification syntax Resolve deprecation warnings for changes in ArduinoJson. See: https://arduinojson.org/v7/api/jsondocument/containskey/ --- src/ESPUIclient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ESPUIclient.cpp b/src/ESPUIclient.cpp index 0becacf..ab47d10 100644 --- a/src/ESPUIclient.cpp +++ b/src/ESPUIclient.cpp @@ -310,14 +310,14 @@ uint32_t ESPUIclient::prepareJSONChunk(uint16_t startindex, break; } - if(!FragmentRequest.containsKey(F("id"))) + if(!FragmentRequest["id"].is()) { Serial.println(F("ERROR:prepareJSONChunk:Fragmentation:Request does not contain a control ID")); break; } uint16_t ControlId = uint16_t(FragmentRequest[F("id")]); - if(!FragmentRequest.containsKey(F("offset"))) + if(!FragmentRequest["offset"].is()) { Serial.println(F("ERROR:prepareJSONChunk:Fragmentation:Request does not contain a starting offset")); break;