update doc according to ArduinoJson upgrade

From information found on the following [issue](https://github.com/me-no-dev/ESPAsyncWebServer/edit/master/README.md) and [ArduinoJson upgrade note](https://arduinojson.org/v6/doc/upgrade/)
This commit is contained in:
Julien Jet
2024-11-15 15:49:16 +01:00
committed by GitHub
parent c38d615de5
commit 60f9b47bee

View File

@@ -622,7 +622,7 @@ Endpoints which consume JSON can use a special handler to get ready to use JSON
#include "ArduinoJson.h" #include "ArduinoJson.h"
AsyncCallbackJsonWebHandler* handler = new AsyncCallbackJsonWebHandler("/rest/endpoint", [](AsyncWebServerRequest *request, JsonVariant &json) { AsyncCallbackJsonWebHandler* handler = new AsyncCallbackJsonWebHandler("/rest/endpoint", [](AsyncWebServerRequest *request, JsonVariant &json) {
JsonObject& jsonObj = json.as<JsonObject>(); JsonObject jsonObj = json.as<JsonObject>();
// ... // ...
}); });
server.addHandler(handler); server.addHandler(handler);