⚠️ 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.
JsonBuffer is the entry point for using the library: it handles the memory management and calls the parser.
It implements a speed efficient memory pool and comes in two flavors:
DynamicJsonBufferwhich is allocated on the heap and grows automatically
StaticJsonBufferwhich is (most likely) allocated on the stack and has a fixed size.
- Serialization tutorial
- Deserialization tutorial
- How to reuse a JsonBuffer?
- What are the differences between StaticJsonBuffer and DynamicJsonBuffer?
- How to determine the buffer size?
- Why shouldn’t I use a global JsonBuffer?
- What are the common sizes for JsonBuffer?
The book Mastering ArduinoJson is the best material to learn how to use ArduinoJson.
Chapter 5 explains how ArduinoJson works from the inside.
It explains why the class
JsonBuffer is crucial for the performance of the library.
DynamicJsonBuffer, shows the differences between the two, and tells how to choose between them.
Chapter 6 is a troubleshooting guide that helps you get out of every difficult situation.