⚠️ CAUTION: SLIPPERY FLOOR ⚠️The Arduino Library Manager installs the ArduinoJson version 6 by default.
However, using version 5 is highly recommended because version 6 is still in beta stage.
Open the Arduino Library Manager and make sure that ArduinoJson version 5.13.4 is installed.
error: use of deleted function 'ArduinoJson::JsonArray& ArduinoJson::JsonArray::operator=(const ArduinoJson::JsonArray&)' error: use of deleted function 'ArduinoJson::JsonObject& ArduinoJson::JsonObject::operator=(const ArduinoJson::JsonObject&)'
One solution is to use a pointer instead.
JsonObject* myObject = &root["myObject"].as<JsonObject>();
You can also use a
JsonVariant which will act as a wrapper around the pointer.
JsonVariant myObject = root["myObject"];