8000 Added an clear message for `StaticJsonDocument`, `DynamicJsonDocument… · fuzzitdev/ArduinoJson@f20f8e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit f20f8e3

Browse files
committed
Added an clear message for StaticJsonDocument, DynamicJsonDocument...
1 parent 5c297ba commit f20f8e3

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ HEAD
66

77
* Fixed warning "unused variable" with GCC 4.4 (issue #912)
88
* Fixed warning "maybe uninitialized" (issue #909)
9+
* Added an clear message for `StaticJsonDocument`, `DynamicJsonDocument`...
910

1011
v5.13.4
1112
-------

src/ArduinoJson.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@
1717
#include "ArduinoJson/JsonObjectImpl.hpp"
1818
#include "ArduinoJson/JsonVariantImpl.hpp"
1919
#include "ArduinoJson/Serialization/JsonSerializerImpl.hpp"
20+
21+
#include "ArduinoJson/compatibility.hpp"

src/ArduinoJson/compatibility.hpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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

Comments
 (0)
0