The problem

ArduinoJson 6 replaced the concept of JsonBuffer with the concept of JsonDocument. If you compile a program written for version 5 against version 6 of the library, you might get the following error:

  • error: 'StaticJsonBuffer' was not declared in this scope
  • error: 'DynamicJsonBuffer' was not declared in this scope
  • error: 'StaticJsonBuffer' does not name a type
  • error: 'DynamicJsonBuffer' does not name a type

The solutions

Two solutions:

  1. Downgrade ArduinoJson to 5.x (recommended as v6 is still in beta)
  2. Upgrade your program to work with ArduinoJson 6 (instructions here)