no need to pretty json output

This commit is contained in:
Proddy
2024-01-03 23:03:41 +01:00
parent cb5f707b2d
commit 8384344c5a

View File

@@ -107,12 +107,15 @@ void WebAPIService::parse(AsyncWebServerRequest * request, JsonObject & input) {
// output json buffer // output json buffer
size_t buffer = EMSESP_JSON_SIZE_XXXLARGE; size_t buffer = EMSESP_JSON_SIZE_XXXLARGE;
auto * response = new PrettyAsyncJsonResponse(false, buffer); AsyncJsonResponse * response = new AsyncJsonResponse(false, buffer);
// add more mem if needed - won't be needed in ArduinoJson 7
while (!response->getSize()) { while (!response->getSize()) {
delete response; delete response;
buffer -= 1024; buffer -= 1024;
response = new PrettyAsyncJsonResponse(false, buffer); response = new AsyncJsonResponse(false, buffer);
} }
JsonObject output = response->getRoot(); JsonObject output = response->getRoot();
// call command // call command