forked from bblanchon/ArduinoJson
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
ecbc8e85d4 | |||
4d00ed9efc | |||
cd5566cd40 | |||
52d8a65cbc |
@ -1,6 +1,11 @@
|
||||
ArduinoJson: change log
|
||||
=======================
|
||||
|
||||
HEAD
|
||||
----
|
||||
|
||||
* Fix compatibility with the Blynk libary (issue #1914)
|
||||
|
||||
v6.21.2 (2023-04-12)
|
||||
-------
|
||||
|
||||
|
@ -14,7 +14,7 @@ void setup() {
|
||||
while (!Serial) continue;
|
||||
|
||||
// The huge input: an extract from OpenWeatherMap response
|
||||
const __FlashStringHelper* input_json = F(
|
||||
auto input_json = F(
|
||||
"{\"cod\":\"200\",\"message\":0,\"list\":[{\"dt\":1581498000,\"main\":{"
|
||||
"\"temp\":3.23,\"feels_like\":-3.63,\"temp_min\":3.23,\"temp_max\":4.62,"
|
||||
"\"pressure\":1014,\"sea_level\":1014,\"grnd_level\":1010,\"humidity\":"
|
||||
|
@ -46,6 +46,7 @@ update_version_in_source () {
|
||||
-e "s/ARDUINOJSON_VERSION_MAJOR .*$/ARDUINOJSON_VERSION_MAJOR $MAJOR/" \
|
||||
-e "s/ARDUINOJSON_VERSION_MINOR .*$/ARDUINOJSON_VERSION_MINOR $MINOR/" \
|
||||
-e "s/ARDUINOJSON_VERSION_REVISION .*$/ARDUINOJSON_VERSION_REVISION $REVISION/" \
|
||||
-e "s/ARDUINOJSON_VERSION_MACRO .*$/ARDUINOJSON_VERSION_MACRO V$MAJOR$MINOR$REVISION/" \
|
||||
src/ArduinoJson/version.hpp
|
||||
rm src/ArduinoJson/version.hpp*~
|
||||
}
|
||||
|
@ -14,8 +14,8 @@ compile() {
|
||||
{
|
||||
"code":$(read_string "$FILE_PATH"),
|
||||
"codes": [{"file":"ArduinoJson.h","code":$(read_string "$ARDUINOJSON_H")}],
|
||||
"options": "warning",
|
||||
"compiler": "gcc-4.9.4",
|
||||
"options": "warning,c++11",
|
||||
"compiler": "gcc-5.5.0",
|
||||
"save": true
|
||||
}
|
||||
END
|
||||
|
@ -152,3 +152,16 @@ TEST_CASE("ConverterNeedsWriteableRef") {
|
||||
CHECK(ConverterNeedsWriteableRef<JsonArray>::value == true);
|
||||
CHECK(ConverterNeedsWriteableRef<JsonArrayConst>::value == false);
|
||||
}
|
||||
|
||||
namespace ArduinoJson {
|
||||
void convertToJson(char c, JsonVariant var) {
|
||||
char buf[] = {c, 0};
|
||||
var.set(buf);
|
||||
}
|
||||
} // namespace ArduinoJson
|
||||
|
||||
TEST_CASE("Convert char to string") { // issue #1922
|
||||
StaticJsonDocument<64> doc;
|
||||
doc.set('a');
|
||||
REQUIRE(doc.as<std::string>() == "a");
|
||||
}
|
||||
|
@ -55,5 +55,8 @@
|
||||
// issue #1905
|
||||
#define _current
|
||||
|
||||
// issue #1914
|
||||
#define V6 6
|
||||
|
||||
// catch.hpp mutes several warnings, this file also allows to detect them
|
||||
#include "ArduinoJson.h"
|
||||
|
@ -12,9 +12,7 @@
|
||||
|
||||
# define ARDUINOJSON_VERSION_NAMESPACE \
|
||||
ARDUINOJSON_CONCAT3( \
|
||||
ARDUINOJSON_CONCAT4(V, ARDUINOJSON_VERSION_MAJOR, \
|
||||
ARDUINOJSON_VERSION_MINOR, \
|
||||
ARDUINOJSON_VERSION_REVISION), \
|
||||
ARDUINOJSON_VERSION_MACRO, \
|
||||
ARDUINOJSON_BIN2ALPHA( \
|
||||
ARDUINOJSON_ENABLE_PROGMEM, ARDUINOJSON_USE_LONG_LONG, \
|
||||
ARDUINOJSON_USE_DOUBLE, ARDUINOJSON_ENABLE_STRING_DEDUPLICATION), \
|
||||
|
@ -8,8 +8,6 @@
|
||||
#define ARDUINOJSON_CONCAT2(A, B) ARDUINOJSON_CONCAT_(A, B)
|
||||
#define ARDUINOJSON_CONCAT3(A, B, C) \
|
||||
ARDUINOJSON_CONCAT2(ARDUINOJSON_CONCAT2(A, B), C)
|
||||
#define ARDUINOJSON_CONCAT4(A, B, C, D) \
|
||||
ARDUINOJSON_CONCAT2(ARDUINOJSON_CONCAT2(A, B), ARDUINOJSON_CONCAT2(C, D))
|
||||
|
||||
#define ARDUINOJSON_BIN2ALPHA_0000() A
|
||||
#define ARDUINOJSON_BIN2ALPHA_0001() B
|
||||
|
@ -8,3 +8,4 @@
|
||||
#define ARDUINOJSON_VERSION_MAJOR 6
|
||||
#define ARDUINOJSON_VERSION_MINOR 21
|
||||
#define ARDUINOJSON_VERSION_REVISION 2
|
||||
#define ARDUINOJSON_VERSION_MACRO V6212
|
||||
|
Reference in New Issue
Block a user