8000 Make PrettyAsyncJsonResponse to use maxJsonBufferSize for ArduinoJson… · Rzyq-git/ESPAsyncWebServer@e88fc12 · GitHub
[go: up one dir, main page]

Skip to content

Commit e88fc12

Browse files
CODeRUSme-no-dev
authored andcommitted
Make PrettyAsyncJsonResponse to use maxJsonBufferSize for ArduinoJson 6 (me-no-dev#607)
1 parent 7949d83 commit e88fc12

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/AsyncJson.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@ class AsyncJsonResponse: public AsyncAbstractResponse {
142142

143143
class PrettyAsyncJsonResponse: public AsyncJsonResponse {
144144
public:
145-
PrettyAsyncJsonResponse (bool isArray=false) : AsyncJsonResponse{isArray} {}
145+
#ifdef ARDUINOJSON_5_COMPATIBILITY
146+
PrettyAsyncJsonResponse (bool isArray=false) : AsyncJsonResponse{isArray} {}
147+
#else
148+
PrettyAsyncJsonResponse (bool isArray=false, size_t maxJsonBufferSize = DYNAMIC_JSON_DOCUMENT_SIZE) : AsyncJsonResponse{isArray, maxJsonBufferSize} {}
149+
#endif
146150
size_t setLength () {
147151
#ifdef ARDUINOJSON_5_COMPATIBILITY
148152
_contentLength = _root.measurePrettyLength ();

0 commit comments

Comments
 (0)
0