As I was setting up a PIO project I had a bunch of depreciation warnings. Perhaps i'm on an arduinoJson branch that is too recent?
Here are my depencies:
lib_deps =
; Audio development framework
https://github.com/pschatzmann/arduino-audio-tools.git#v1.2.1
; Rest API framework
https://github.com/knolleary/pubsubclient#v2.8
; JSON framework (Used for Rest API)
https://github.com/marcoschwartz/aREST#v3.1.4
; JSON framework (Used for Rest API)
https://github.com/bblanchon/ArduinoJson#v7.4.2
; Websocket Framework (Used for Rest API)
https://github.com/gilmaimon/ArduinoWebsockets#0.5.4
And here are the warnings I get:
In file included from src/main.cpp:4:
.pio/libdeps/esp32dev/aREST/aREST.h:2425:74: warning: 'ArduinoJson::V742PB22::JsonArray ArduinoJson::V742PB22::detail::VariantRefBase<TDerived>::createNestedArray(TChar*) const [with TChar = const char; TDerived = ArduinoJson::V742PB22::detail::MemberProxy<ArduinoJson::V742PB22::JsonDocument&, ArduinoJson::V742PB22::detail::RamString>]' is deprecated: use var[key].to<JsonArray>() instead [-Wdeprecated-declarations]
JsonArray funcs = responseDoc["result"].createNestedArray("functions");
^
In file included from .pio/libdeps/esp32dev/ArduinoJson/src/ArduinoJson.hpp:55,
from .pio/libdeps/esp32dev/ArduinoJson/src/ArduinoJson.h:9,
from .pio/libdeps/esp32dev/aREST/aREST.h:40,
from src/main.cpp:4:
.pio/libdeps/esp32dev/ArduinoJson/src/ArduinoJson/Variant/VariantRefBaseImpl.hpp:33:18: note: declared here
inline JsonArray VariantRefBase<TDerived>::createNestedArray(TChar* key) const {
In file included from src/main.cpp:4:
.pio/libdeps/esp32dev/aREST/aREST.h: In member function 'void MQTTClient::sendCommandResponse(const String&, const String&, const String&, int)':
.pio/libdeps/esp32dev/aREST/aREST.h:2467:3: warning: 'template<unsigned int N> class ArduinoJson::V742PB22::StaticJsonDocument' is deprecated: use JsonDocument instead [-Wdeprecated-declarations]
StaticJsonDocument<512> doc;
^~~~~~~~~~~~~~~~~~
In file included from .pio/libdeps/esp32dev/ArduinoJson/src/ArduinoJson.hpp:65,
from .pio/libdeps/esp32dev/ArduinoJson/src/ArduinoJson.h:9,
from .pio/libdeps/esp32dev/aREST/aREST.h:40,
from src/main.cpp:4:
.pio/libdeps/esp32dev/ArduinoJson/src/ArduinoJson/compatibility.hpp:63:58: note: declared here
class ARDUINOJSON_DEPRECATED("use JsonDocument instead") StaticJsonDocument
^~~~~~~~~~~
In file included from src/main.cpp:4:
.pio/libdeps/esp32dev/aREST/aREST.h:2239:39: warning: 'bool ArduinoJson::V742PB22::JsonDocument::containsKey(TChar*) const [with TChar = const char]' is deprecated: use doc["key"].is<T>() instead [-Wdeprecated-declarations]
} else if (doc.containsKey("value")) {
^
In file included from .pio/libdeps/esp32dev/ArduinoJson/src/ArduinoJson.hpp:42,
from .pio/libdeps/esp32dev/ArduinoJson/src/ArduinoJson.h:9,
from .pio/libdeps/esp32dev/aREST/aREST.h:40,
from src/main.cpp:4:
.pio/libdeps/esp32dev/ArduinoJson/src/ArduinoJson/Document/JsonDocument.hpp:167:8: note: declared here
bool containsKey(TChar* key) const {
As I was setting up a PIO project I had a bunch of depreciation warnings. Perhaps i'm on an arduinoJson branch that is too recent?
Here are my depencies:
And here are the warnings I get: