The code will not compile without errors In PlatformIO because the DynamicJsonDocument has been deprecated in ArduinoJSON version 7. For example:
In file included from .pio/libdeps/lilygo-t-display/ArduinoJson/src/ArduinoJson.hpp:53, from .pio/libdeps/lilygo-t-display/ArduinoJson/src/ArduinoJson.h:9, from src/ConfigurationManagement/configuration.h:9, from src/System/TaskManager.h:9, from src/TaskMQTT.h:4, from src/TaskMQTT.cpp:4: .pio/libdeps/lilygo-t-display/ArduinoJson/src/ArduinoJson/compatibility.hpp:125:58: note: declared here class ARDUINOJSON_DEPRECATED("use JsonDocument instead") DynamicJsonDocument
or here:
cc1plus.exe: out of memory allocating 8392703 bytes src/TaskMQTT.cpp: In member function 'virtual bool MQTTTask::loop(System&)': src/TaskMQTT.cpp:32:29: warning: 'DynamicJsonDocument' is deprecated: use JsonDocument instead [-Wdeprecated-declarations] DynamicJsonDocument data(1024);
The code will not compile without errors In PlatformIO because the DynamicJsonDocument has been deprecated in ArduinoJSON version 7. For example:
In file included from .pio/libdeps/lilygo-t-display/ArduinoJson/src/ArduinoJson.hpp:53, from .pio/libdeps/lilygo-t-display/ArduinoJson/src/ArduinoJson.h:9, from src/ConfigurationManagement/configuration.h:9, from src/System/TaskManager.h:9, from src/TaskMQTT.h:4, from src/TaskMQTT.cpp:4: .pio/libdeps/lilygo-t-display/ArduinoJson/src/ArduinoJson/compatibility.hpp:125:58: note: declared here class ARDUINOJSON_DEPRECATED("use JsonDocument instead") DynamicJsonDocument
or here:cc1plus.exe: out of memory allocating 8392703 bytes src/TaskMQTT.cpp: In member function 'virtual bool MQTTTask::loop(System&)': src/TaskMQTT.cpp:32:29: warning: 'DynamicJsonDocument' is deprecated: use JsonDocument instead [-Wdeprecated-declarations] DynamicJsonDocument data(1024);
Workarounds? Or upgrade code?