Added an clear message for StaticJsonDocument, DynamicJsonDocument...

This commit is contained in:
Benoit Blanchon
2019-02-28 14:38:13 +01:00
parent 5c297ba4a2
commit f20f8e3171
3 changed files with 34 additions and 0 deletions

View File

@ -6,6 +6,7 @@ HEAD
* Fixed warning "unused variable" with GCC 4.4 (issue #912)
* Fixed warning "maybe uninitialized" (issue #909)
* Added an clear message for `StaticJsonDocument`, `DynamicJsonDocument`...
v5.13.4
-------

View File

@ -17,3 +17,5 @@
#include "ArduinoJson/JsonObjectImpl.hpp"
#include "ArduinoJson/JsonVariantImpl.hpp"
#include "ArduinoJson/Serialization/JsonSerializerImpl.hpp"
#include "ArduinoJson/compatibility.hpp"

View File

@ -0,0 +1,31 @@
// ArduinoJson - arduinojson.org
// Copyright Benoit Blanchon 2014-2019
// MIT License
//
// clang-format off
#ifdef __GNUC__
#define ARDUINOJSON_PRAGMA(x) _Pragma(#x)
#define ARDUINOJSON_COMPILE_ERROR(msg) ARDUINOJSON_PRAGMA(GCC error msg)
#define ARDUINOJSON_STRINGIFY(S) #S
#define ARDUINOJSON_DEPRECATION_ERROR(X, Y) \
ARDUINOJSON_COMPILE_ERROR(ARDUINOJSON_STRINGIFY(X is a Y from ArduinoJson 6 but version 5 is installed. Visit arduinojson.org to get more information.))
#define StaticJsonDocument ARDUINOJSON_DEPRECATION_ERROR(StaticJsonDocument, class)
#define DynamicJsonDocument ARDUINOJSON_DEPRECATION_ERROR(DynamicJsonDocument, class)
#define JsonDocument ARDUINOJSON_DEPRECATION_ERROR(JsonDocument, class)
#define DeserializationError ARDUINOJSON_DEPRECATION_ERROR(DeserializationError, class)
#define deserializeJson ARDUINOJSON_DEPRECATION_ERROR(deserializeJson, function)
#define deserializeMsgPack ARDUINOJSON_DEPRECATION_ERROR(deserializeMsgPack, function)
#define serializeJson ARDUINOJSON_DEPRECATION_ERROR(serializeJson, function)
#define serializeMsgPack ARDUINOJSON_DEPRECATION_ERROR(serializeMsgPack, function)
#define serializeJsonPretty ARDUINOJSON_DEPRECATION_ERROR(serializeJsonPretty, function)
#define measureMsgPack ARDUINOJSON_DEPRECATION_ERROR(measureMsgPack, function)
#define measureJson ARDUINOJSON_DEPRECATION_ERROR(measureJson, function)
#define measureJsonPretty ARDUINOJSON_DEPRECATION_ERROR(measureJsonPretty, function)
#endif