mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
no need to pretty json output
This commit is contained in:
@@ -106,13 +106,16 @@ void WebAPIService::parse(AsyncWebServerRequest * request, JsonObject & input) {
|
|||||||
emsesp::EMSESP::system_.refreshHeapMem();
|
emsesp::EMSESP::system_.refreshHeapMem();
|
||||||
|
|
||||||
// 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
|
||||||
|
|||||||
Reference in New Issue
Block a user