CAUTION: SLIPPERY FLOORThe 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 is installed.
The tutorial on “How to generate JSON with ArduinoJson” can be found in the fourth chapter of “Mastering ArduinoJson”.
The book contains everything you need to know to use the library efficiently. In particular, it contains several new example project that shows the best practices.