Merge pull request #191 from toblum/develop

fix JSON memory allocation for '/esp_status'
This commit is contained in:
Tobias Blum 2018-06-20 01:36:40 +02:00 committed by GitHub
commit a6f2fdf24d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -492,7 +492,7 @@ void setup() {
}, handleFileUpload);
//get heap status, analog input value and all GPIO statuses in one json call
server.on("/esp_status", HTTP_GET, []() {
DynamicJsonDocument jsonBuffer(JSON_OBJECT_SIZE(9));
DynamicJsonDocument jsonBuffer;
JsonObject& json = jsonBuffer.to<JsonObject>();
json["HOSTNAME"] = HOSTNAME;