diff --git a/src/EMSESPAPIService.cpp b/src/EMSESPAPIService.cpp index 907f60a7f..e8e1c8ba2 100644 --- a/src/EMSESPAPIService.cpp +++ b/src/EMSESPAPIService.cpp @@ -109,6 +109,7 @@ void EMSESPAPIService::emsespAPIService(AsyncWebServerRequest * request) { // if we have returned data in JSON format, send this to the WEB if (output.size()) { + doc.shrinkToFit(); char buffer[EMSESP_MAX_JSON_SIZE_LARGE]; serializeJson(doc, buffer); request->send(200, "text/plain", buffer);