Implement JSON buffer in PSRAM to free up DRAM.

This commit is contained in:
Blaz Kristan
2023-12-21 21:30:17 +01:00
parent 4e105492ca
commit 1f81fb9284
19 changed files with 106 additions and 75 deletions

View File

@@ -180,8 +180,8 @@ void initServer()
if (!requestJSONBufferLock(14)) return;
DeserializationError error = deserializeJson(doc, (uint8_t*)(request->_tempObject));
JsonObject root = doc.as<JsonObject>();
DeserializationError error = deserializeJson(*pDoc, (uint8_t*)(request->_tempObject));
JsonObject root = pDoc->as<JsonObject>();
if (error || root.isNull()) {
releaseJSONBufferLock();
serveJsonError(request, 400, ERR_JSON);