|
| 1 | +// ArduinoJson - arduinojson.org |
| 2 | +// Copyright Benoit Blanchon 2014-2019 |
| 3 | +// MIT License |
| 4 | +// |
| 5 | +// clang-format off |
| 6 | + |
| 7 | +#ifdef __GNUC__ |
| 8 | + |
| 9 | +#define ARDUINOJSON_PRAGMA(x) _Pragma(#x) |
| 10 | + |
| 11 | +#define ARDUINOJSON_COMPILE_ERROR(msg) ARDUINOJSON_PRAGMA(GCC error msg) |
| 12 | + |
| 13 | +#define ARDUINOJSON_STRINGIFY(S) #S |
| 14 | + |
| 15 | +#define ARDUINOJSON_DEPRECATION_ERROR(X, Y) \ |
| 16 | + ARDUINOJSON_COMPILE_ERROR(ARDUINOJSON_STRINGIFY(X is a Y from ArduinoJson 6 but version 5 is installed. Visit arduinojson.org to get more information.)) |
| 17 | + |
| 18 | +#define StaticJsonDocument ARDUINOJSON_DEPRECATION_ERROR(StaticJsonDocument, class) |
| 19 | +#define DynamicJsonDocument ARDUINOJSON_DEPRECATION_ERROR(DynamicJsonDocument, class) |
| 20 | +#define JsonDocument ARDUINOJSON_DEPRECATION_ERROR(JsonDocument, class) |
| 21 | +#define DeserializationError ARDUINOJSON_DEPRECATION_ERROR(DeserializationError, class) |
| 22 | +#define deserializeJson ARDUINOJSON_DEPRECATION_ERROR(deserializeJson, function) |
| 23 | +#define deserializeMsgPack ARDUINOJSON_DEPRECATION_ERROR(deserializeMsgPack, function) |
| 24 | +#define serializeJson ARDUINOJSON_DEPRECATION_ERROR(serializeJson, function) |
| 25 | +#define serializeMsgPack ARDUINOJSON_DEPRECATION_ERROR(serializeMsgPack, function) |
| 26 | +#define serializeJsonPretty ARDUINOJSON_DEPRECATION_ERROR(serializeJsonPretty, function) |
| 27 | +#define measureMsgPack ARDUINOJSON_DEPRECATION_ERROR(measureMsgPack, function) |
| 28 | +#define measureJson ARDUINOJSON_DEPRECATION_ERROR(measureJson, function) |
| 29 | +#define measureJsonPretty ARDUINOJSON_DEPRECATION_ERROR(measureJsonPretty, function) |
| 30 | + |
| 31 | +#endif |
0 commit comments