Skip to content

Commit 7c4d777

Browse files
Merge pull request #497 from KipK/fix-#496
fix #496 #492 increased json object size
2 parents cc9e73f + e5053b8 commit 7c4d777

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/web_server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ void handleStatusPost(MongooseHttpServerRequest *request, MongooseHttpServerResp
681681
{
682682
String body = request->body().toString();
683683
// Deserialize the JSON document
684-
const size_t capacity = JSON_OBJECT_SIZE(50) + 1024;
684+
const size_t capacity = JSON_OBJECT_SIZE(128) + 1024;
685685
DynamicJsonDocument doc(capacity);
686686
DeserializationError error = deserializeJson(doc, body);
687687
if(!error)

src/web_server_config.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ extern bool isPositive(MongooseHttpServerRequest *request, const char *param);
2424
void
2525
handleConfigGet(MongooseHttpServerRequest *request, MongooseHttpServerResponseStream *response)
2626
{
27-
const size_t capacity = JSON_OBJECT_SIZE(43) + 1024;
27+
const size_t capacity = JSON_OBJECT_SIZE(128) + 1024;
2828
DynamicJsonDocument doc(capacity);
2929

3030
// Read only information
@@ -73,7 +73,7 @@ handleConfigPost(MongooseHttpServerRequest *request, MongooseHttpServerResponseS
7373
String body = request->body().toString();
7474

7575
// Deserialize the JSON document
76-
const size_t capacity = JSON_OBJECT_SIZE(50) + 1024;
76+
const size_t capacity = JSON_OBJECT_SIZE(128) + 1024;
7777
DynamicJsonDocument doc(capacity);
7878
DeserializationError error = deserializeJson(doc, body);
7979
if(!error)

0 commit comments

Comments
 (0)