Upgrades ArduinoJson from version 6 to 7

This commit is contained in:
Rune Harlyk
2024-05-07 10:36:16 +02:00
committed by Rune Harlyk
parent 2b4d196e7c
commit a150caad9d
39 changed files with 241 additions and 561 deletions
+2 -3
View File
@@ -95,7 +95,7 @@ public:
if (_pubTopic.length() > 0 && _mqttClient->connected())
{
// serialize to json doc
DynamicJsonDocument json(_bufferSize);
JsonDocument json;
JsonObject jsonObject = json.to<JsonObject>();
_statefulService->read(jsonObject, _stateReader);
@@ -116,7 +116,6 @@ public:
protected:
StatefulService<T> *_statefulService;
PsychicMqttClient *_mqttClient;
int _bufferSize;
JsonStateUpdater<T> _stateUpdater;
JsonStateReader<T> _stateReader;
String _subTopic;
@@ -136,7 +135,7 @@ protected:
}
// deserialize from string
DynamicJsonDocument json(_bufferSize);
JsonDocument json;
DeserializationError error = deserializeJson(json, payload);
if (!error && json.is<JsonObject>())
{