json optimizations

This commit is contained in:
proddy
2020-10-17 16:56:06 +02:00
parent 39b44e31f1
commit 07b8c3bb25

View File

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