Update AsyncJson.h (#533)

for the newest ArduinoJson v6 compatibility
This commit is contained in:
Marco Tombesi 2019-06-24 17:27:35 +02:00 committed by Me No Dev
parent b3b9ec901a
commit b0c6144886
1 changed files with 2 additions and 0 deletions

View File

@ -140,6 +140,7 @@ class AsyncJsonResponse: public AsyncAbstractResponse {
}
};
#ifdef ARDUINOJSON_5_COMPATIBILITY
class PrettyAsyncJsonResponse: public AsyncJsonResponse {
public:
PrettyAsyncJsonResponse (bool isArray=false) : AsyncJsonResponse{isArray} {}
@ -154,6 +155,7 @@ public:
return len;
}
};
#endif
typedef std::function<void(AsyncWebServerRequest *request, JsonVariant &json)> ArJsonRequestHandlerFunction;