ARDUINOJSON_USE_LONG_LONG
Determines the type used to store integer values in JsonVariant.
- If
ARDUINOJSON_USE_LONG_LONG == 0, thenJsonVariantstores along - If
ARDUINOJSON_USE_LONG_LONG == 1, thenJsonVariantstores along long
The default is 0 when ARDUINO is defined, 1 otherwise.
In other words, it’s long on embedded systems, but long long on computers.
To override the default value, you need to #define the value before including ArduinoJson.h, like this:
#define ARDUINOJSON_USE_LONG_LONG 1
#include <ArduinoJson.h>
Can’t use the Assistant
The ArduinoJson Assistant assumes that your program uses the default value for
ARDUINOJSON_USE_LONG_LONG.If you change from the default, the ArduinoJson Assistant will return incorrect values.
Several
.inoor.cppfiles?Be careful if several compilation units compose your program, i.e., if your project contains several
.inoor.cppfiles.It’s crucial that you use the same value of
ARDUINOJSON_USE_LONG_LONGin each compilation unit; otherwise, the executable will contain a mix of both versions, and will inevitably crash.