The long-awaited ArduinoJson 7 is finally here!
It redefines the memory allocation strategy to adapt to the new microcontroller landscape.
It abandons fixed memory allocation in favor of an entirely dynamic strategy.
StaticJsonDocument
and DynamicJsonDocument
merged into a single JsonDocument
class with elastic capacity.
// ArduinoJson 6
StaticJsonDocument<256> doc;
// or
DynamicJsonDocument doc(256);
// ArduinoJson 7
JsonDocument doc;
ArduinoJson 7 is code-compatible with ArduinoJson 6, but you probably want to upgrade your code to enjoy the simplicity of the new API.
See the article on arduinojson.org or watch the video on YouTube for details.