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.
NOTE: this is only applicable for ArduinoJson strictly older to 5.11.1
This may happen if you’re targeting a platform where
doubles have only 32-bits.
Usually ArduinoJson can detect this, but when it doesn’t you may have the following errors:
warning: floating constant exceeds range of 'double' [-Woverflow] warning: floating constant truncated to zero [-Woverflow]
Error[Pe030]: floating constant is out of range
The solution is to define
#define ARDUINOJSON_DOUBLE_IS_64BITS 0 #include <ArduinoJson.h>