ArduinoJson v7 support

pull/197/head
Timm Bogner 4 months ago
parent b62864eddb
commit bd3fcb1f7c

@ -100,7 +100,7 @@ void sendLog()
DBG("Logging to buffer");
for (int i = 0; i < ln; i++)
{
StaticJsonDocument<96> doc;
JsonDocument doc;
JsonObject doc_0 = doc.createNestedObject();
doc_0["id"] = theData[i].id;
doc_0["type"] = theData[i].t;

@ -119,7 +119,7 @@ void mqtt_callback(char *topic, byte *message, unsigned int length)
{
incomingString += (char)message[i];
}
StaticJsonDocument<2048> doc;
JsonDocument doc;
DeserializationError error = deserializeJson(doc, incomingString);
if (error)
{ // Test if parsing succeeds.
@ -180,7 +180,7 @@ void mqtt_publish(const char *payload)
void sendMQTT()
{
DBG("Sending MQTT.");
DynamicJsonDocument doc(24576);
JsonDocument doc;
for (int i = 0; i < ln; i++)
{
doc[i]["id"] = theData[i].id;

@ -32,7 +32,7 @@ void getSerial() {
else if (Serial.available()){
incomingString = Serial.readStringUntil('\n');
}
DynamicJsonDocument doc(24576);
JsonDocument doc;
DeserializationError error = deserializeJson(doc, incomingString);
if (error) { // Test if parsing succeeds.
// DBG("json parse err");
@ -55,7 +55,7 @@ void getSerial() {
void sendSerial() {
DBG("Sending Serial.");
DynamicJsonDocument doc(24576);
JsonDocument doc;
for (int i = 0; i < ln; i++) {
doc[i]["id"] = theData[i].id;
doc[i]["type"] = theData[i].t;

Loading…
Cancel
Save