6.2.0-beta set value issue
Created by: bestpika
This code at 6.1.0-beta
is worked.
#include "ArduinoJson.h"
DynamicJsonDocument doc;
JsonObject root;
void setup() {
Serial.begin(115200);
Serial.print("\n\n");
root = doc.to<JsonObject>();
String key1 = "key1";
auto val1 = "val1";
root[key1] = val1;
String key2 = "key2";
auto val2 = 2;
root.set(key2, val2);
serializeJsonPretty(root, Serial);
Serial.print("\n\n");
}
void loop() {}
But at 6.2.0-beta
I get {}