You just upgraded the library, and now the compilation fails?

First, you need to check of the ArduinoJson examples fail to compile too.

If the examples compile correctly, it means that there was a breaking change in the library. Breaking changes are rare but happen sometimes. Check the change log; all breaking changes are explicitly specified.

If the examples fail to compile, it means that the library is not properly installed. For unknown reasons, the Arduino Library Manager sometimes upgrades the library partially: it update some files but not all. The solution is to uninstall the library and reinstall it.

It’s impossible to dress a complete list of the error messages caused by a failed upgrade because they are always different; but here are a few examples:

  • fatal error: Data/ValueSetter.hpp: No such file or directory
  • fatal error: Data/JsonVariantComparer.hpp: No such file or directory
  • error: 'parseInteger' was not declared in this scope
Global warming stripes by Professor Ed Hawkins (University of Reading)