Make PrettyAsyncJsonResponse to use maxJsonBufferSize for ArduinoJson 6 (#607)
This commit is contained in:
parent
7949d83e91
commit
e88fc12de8
|
@ -142,7 +142,11 @@ class AsyncJsonResponse: public AsyncAbstractResponse {
|
||||||
|
|
||||||
class PrettyAsyncJsonResponse: public AsyncJsonResponse {
|
class PrettyAsyncJsonResponse: public AsyncJsonResponse {
|
||||||
public:
|
public:
|
||||||
|
#ifdef ARDUINOJSON_5_COMPATIBILITY
|
||||||
PrettyAsyncJsonResponse (bool isArray=false) : AsyncJsonResponse{isArray} {}
|
PrettyAsyncJsonResponse (bool isArray=false) : AsyncJsonResponse{isArray} {}
|
||||||
|
#else
|
||||||
|
PrettyAsyncJsonResponse (bool isArray=false, size_t maxJsonBufferSize = DYNAMIC_JSON_DOCUMENT_SIZE) : AsyncJsonResponse{isArray, maxJsonBufferSize} {}
|
||||||
|
#endif
|
||||||
size_t setLength () {
|
size_t setLength () {
|
||||||
#ifdef ARDUINOJSON_5_COMPATIBILITY
|
#ifdef ARDUINOJSON_5_COMPATIBILITY
|
||||||
_contentLength = _root.measurePrettyLength ();
|
_contentLength = _root.measurePrettyLength ();
|
||||||
|
|
Loading…
Reference in New Issue