update arduinojson
This commit is contained in:
@@ -1,11 +1,6 @@
|
|||||||
ArduinoJson: change log
|
ArduinoJson: change log
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
v7.4.2 (2025-06-20)
|
|
||||||
------
|
|
||||||
|
|
||||||
* Fix truncated strings on Arduino Due (issue #2181)
|
|
||||||
|
|
||||||
v7.4.1 (2025-04-11)
|
v7.4.1 (2025-04-11)
|
||||||
------
|
------
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ if(ESP_PLATFORM)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
project(ArduinoJson VERSION 7.4.2)
|
project(ArduinoJson VERSION 7.4.1)
|
||||||
|
|
||||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
||||||
include(CTest)
|
include(CTest)
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ ArduinoJson is a C++ JSON library for Arduino and IoT (Internet Of Things).
|
|||||||
* Continuously tested on
|
* Continuously tested on
|
||||||
* [Visual Studio 2017, 2019, 2022](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/7.x)
|
* [Visual Studio 2017, 2019, 2022](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/7.x)
|
||||||
* [GCC 4.8, 5, 6, 7, 8, 9, 10, 11, 12](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22)
|
* [GCC 4.8, 5, 6, 7, 8, 9, 10, 11, 12](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22)
|
||||||
* [Clang 7 to 19](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22)
|
* [Clang 3.9, 4.0, 5.0, 6.0, 7, 8, 9, 10, 11, 12, 13, 14, 15](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22)
|
||||||
* [Continuously fuzzed with Google OSS Fuzz](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:arduinojson)
|
* [Continuously fuzzed with Google OSS Fuzz](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:arduinojson)
|
||||||
* Passes all default checks of [clang-tidy](https://releases.llvm.org/10.0.0/tools/clang/tools/extra/docs/clang-tidy/)
|
* Passes all default checks of [clang-tidy](https://releases.llvm.org/10.0.0/tools/clang/tools/extra/docs/clang-tidy/)
|
||||||
* Well documented
|
* Well documented
|
||||||
@@ -139,6 +139,11 @@ See the [tutorial on arduinojson.org](https://arduinojson.org/v7/doc/serializati
|
|||||||
|
|
||||||
ArduinoJson is thankful to its sponsors. Please give them a visit; they deserve it!
|
ArduinoJson is thankful to its sponsors. Please give them a visit; they deserve it!
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="https://www.programmingelectronics.com/" rel="sponsored">
|
||||||
|
<img src="https://arduinojson.org/images/2021/10/programmingeleactronicsacademy.png" alt="Programming Electronics Academy" width="200">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="https://github.com/1technophile" rel="sponsored">
|
<a href="https://github.com/1technophile" rel="sponsored">
|
||||||
<img alt="1technophile" src="https://avatars.githubusercontent.com/u/12672732?s=40&v=4">
|
<img alt="1technophile" src="https://avatars.githubusercontent.com/u/12672732?s=40&v=4">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: 7.4.2.{build}
|
version: 7.4.1.{build}
|
||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
||||||
|
|||||||
@@ -69,8 +69,6 @@ TEST_CASE("JsonDocument assignment") {
|
|||||||
doc2 = std::move(doc1);
|
doc2 = std::move(doc1);
|
||||||
|
|
||||||
REQUIRE(doc2.as<std::string>() == "{\"hello\":\"world\"}");
|
REQUIRE(doc2.as<std::string>() == "{\"hello\":\"world\"}");
|
||||||
|
|
||||||
// NOLINTNEXTLINE(clang-analyzer-cplusplus.Move)
|
|
||||||
REQUIRE(doc1.as<std::string>() == "null");
|
REQUIRE(doc1.as<std::string>() == "null");
|
||||||
}
|
}
|
||||||
REQUIRE(spyingAllocator.log() == AllocatorLog{
|
REQUIRE(spyingAllocator.log() == AllocatorLog{
|
||||||
|
|||||||
@@ -44,8 +44,6 @@ TEST_CASE("JsonDocument constructor") {
|
|||||||
JsonDocument doc2(std::move(doc1));
|
JsonDocument doc2(std::move(doc1));
|
||||||
|
|
||||||
REQUIRE(doc2.as<std::string>() == "The size of this string is 32!!");
|
REQUIRE(doc2.as<std::string>() == "The size of this string is 32!!");
|
||||||
|
|
||||||
// NOLINTNEXTLINE(clang-analyzer-cplusplus.Move)
|
|
||||||
REQUIRE(doc1.as<std::string>() == "null");
|
REQUIRE(doc1.as<std::string>() == "null");
|
||||||
}
|
}
|
||||||
REQUIRE(spyingAllocator.log() == AllocatorLog{
|
REQUIRE(spyingAllocator.log() == AllocatorLog{
|
||||||
|
|||||||
@@ -29,23 +29,3 @@ set_tests_properties(Misc
|
|||||||
PROPERTIES
|
PROPERTIES
|
||||||
LABELS "Catch"
|
LABELS "Catch"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(Issue2181
|
|
||||||
issue2181.cpp # Cannot be linked with other tests
|
|
||||||
)
|
|
||||||
|
|
||||||
set_target_properties(Issue2181 PROPERTIES UNITY_BUILD OFF)
|
|
||||||
|
|
||||||
add_test(Issue2181 Issue2181)
|
|
||||||
|
|
||||||
set_tests_properties(Issue2181
|
|
||||||
PROPERTIES
|
|
||||||
LABELS "Catch"
|
|
||||||
)
|
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
||||||
target_compile_options(Issue2181
|
|
||||||
PRIVATE
|
|
||||||
-Wno-keyword-macro # keyword is hidden by macro definition
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
// ArduinoJson - https://arduinojson.org
|
|
||||||
// Copyright © 2014-2025, Benoit BLANCHON
|
|
||||||
// MIT License
|
|
||||||
|
|
||||||
#define true 0x1
|
|
||||||
#define false 0x0
|
|
||||||
|
|
||||||
#include <ArduinoJson.h>
|
|
||||||
#include <catch.hpp>
|
|
||||||
|
|
||||||
TEST_CASE("Issue #2181") {
|
|
||||||
JsonDocument doc;
|
|
||||||
doc["hello"] = "world";
|
|
||||||
REQUIRE(doc.as<std::string>() == "{\"hello\":\"world\"}");
|
|
||||||
}
|
|
||||||
@@ -116,12 +116,12 @@ TEST_CASE("StringBuilder") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static VariantData saveString(StringBuilder& builder, const char* s) {
|
static JsonString saveString(StringBuilder& builder, const char* s) {
|
||||||
VariantData data;
|
VariantData data;
|
||||||
builder.startString();
|
builder.startString();
|
||||||
builder.append(s);
|
builder.append(s);
|
||||||
builder.save(&data);
|
builder.save(&data);
|
||||||
return data;
|
return data.asString();
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("StringBuilder::save() deduplicates strings") {
|
TEST_CASE("StringBuilder::save() deduplicates strings") {
|
||||||
@@ -134,9 +134,9 @@ TEST_CASE("StringBuilder::save() deduplicates strings") {
|
|||||||
auto s2 = saveString(builder, "world");
|
auto s2 = saveString(builder, "world");
|
||||||
auto s3 = saveString(builder, "hello");
|
auto s3 = saveString(builder, "hello");
|
||||||
|
|
||||||
REQUIRE(s1.asString() == "hello");
|
REQUIRE(s1 == "hello");
|
||||||
REQUIRE(s2.asString() == "world");
|
REQUIRE(s2 == "world");
|
||||||
REQUIRE(+s1.asString().c_str() == +s3.asString().c_str()); // same address
|
REQUIRE(+s1.c_str() == +s3.c_str()); // same address
|
||||||
|
|
||||||
REQUIRE(spy.log() ==
|
REQUIRE(spy.log() ==
|
||||||
AllocatorLog{
|
AllocatorLog{
|
||||||
@@ -152,10 +152,9 @@ TEST_CASE("StringBuilder::save() deduplicates strings") {
|
|||||||
auto s1 = saveString(builder, "hello world");
|
auto s1 = saveString(builder, "hello world");
|
||||||
auto s2 = saveString(builder, "hello");
|
auto s2 = saveString(builder, "hello");
|
||||||
|
|
||||||
REQUIRE(s1.asString() == "hello world");
|
REQUIRE(s1 == "hello world");
|
||||||
REQUIRE(s2.asString() == "hello");
|
REQUIRE(s2 == "hello");
|
||||||
REQUIRE(+s2.asString().c_str() !=
|
REQUIRE(+s2.c_str() != +s1.c_str()); // different address
|
||||||
+s1.asString().c_str()); // different address
|
|
||||||
|
|
||||||
REQUIRE(spy.log() ==
|
REQUIRE(spy.log() ==
|
||||||
AllocatorLog{
|
AllocatorLog{
|
||||||
@@ -170,10 +169,9 @@ TEST_CASE("StringBuilder::save() deduplicates strings") {
|
|||||||
auto s1 = saveString(builder, "hello world");
|
auto s1 = saveString(builder, "hello world");
|
||||||
auto s2 = saveString(builder, "worl");
|
auto s2 = saveString(builder, "worl");
|
||||||
|
|
||||||
REQUIRE(s1.asString() == "hello world");
|
REQUIRE(s1 == "hello world");
|
||||||
REQUIRE(s2.asString() == "worl");
|
REQUIRE(s2 == "worl");
|
||||||
REQUIRE(s2.asString().c_str() !=
|
REQUIRE(s2.c_str() != s1.c_str()); // different address
|
||||||
s1.asString().c_str()); // different address
|
|
||||||
|
|
||||||
REQUIRE(spy.log() ==
|
REQUIRE(spy.log() ==
|
||||||
AllocatorLog{
|
AllocatorLog{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
version: "7.4.2"
|
version: "7.4.1"
|
||||||
description: >-
|
description: >-
|
||||||
A simple and efficient JSON library for embedded C++.
|
A simple and efficient JSON library for embedded C++.
|
||||||
★ 6953 stars on GitHub!
|
★ 6898 stars on GitHub!
|
||||||
Supports serialization, deserialization, MessagePack, streams, filtering, and more.
|
Supports serialization, deserialization, MessagePack, streams, filtering, and more.
|
||||||
Fully tested and documented.
|
Fully tested and documented.
|
||||||
url: https://arduinojson.org/
|
url: https://arduinojson.org/
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "ArduinoJson",
|
"name": "ArduinoJson",
|
||||||
"keywords": "json, rest, http, web",
|
"keywords": "json, rest, http, web",
|
||||||
"description": "A simple and efficient JSON library for embedded C++. ⭐ 6953 stars on GitHub! Supports serialization, deserialization, MessagePack, streams, filtering, and more. Fully tested and documented.",
|
"description": "A simple and efficient JSON library for embedded C++. ⭐ 6898 stars on GitHub! Supports serialization, deserialization, MessagePack, streams, filtering, and more. Fully tested and documented.",
|
||||||
"homepage": "https://arduinojson.org/?utm_source=meta&utm_medium=library.json",
|
"homepage": "https://arduinojson.org/?utm_source=meta&utm_medium=library.json",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/bblanchon/ArduinoJson.git"
|
"url": "https://github.com/bblanchon/ArduinoJson.git"
|
||||||
},
|
},
|
||||||
"version": "7.4.2",
|
"version": "7.4.1",
|
||||||
"authors": {
|
"authors": {
|
||||||
"name": "Benoit Blanchon",
|
"name": "Benoit Blanchon",
|
||||||
"url": "https://blog.benoitblanchon.fr"
|
"url": "https://blog.benoitblanchon.fr"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
name=ArduinoJson
|
name=ArduinoJson
|
||||||
version=7.4.2
|
version=7.4.1
|
||||||
author=Benoit Blanchon <blog.benoitblanchon.fr>
|
author=Benoit Blanchon <blog.benoitblanchon.fr>
|
||||||
maintainer=Benoit Blanchon <blog.benoitblanchon.fr>
|
maintainer=Benoit Blanchon <blog.benoitblanchon.fr>
|
||||||
sentence=A simple and efficient JSON library for embedded C++.
|
sentence=A simple and efficient JSON library for embedded C++.
|
||||||
paragraph=⭐ 6953 stars on GitHub! Supports serialization, deserialization, MessagePack, streams, filtering, and more. Fully tested and documented.
|
paragraph=⭐ 6898 stars on GitHub! Supports serialization, deserialization, MessagePack, streams, filtering, and more. Fully tested and documented.
|
||||||
category=Data Processing
|
category=Data Processing
|
||||||
url=https://arduinojson.org/?utm_source=meta&utm_medium=library.properties
|
url=https://arduinojson.org/?utm_source=meta&utm_medium=library.properties
|
||||||
architectures=*
|
architectures=*
|
||||||
|
|||||||
@@ -26,15 +26,6 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Remove true and false macros defined by some cores, such as Arduino Due's
|
|
||||||
// See issues #2181 and arduino/ArduinoCore-sam#50
|
|
||||||
#ifdef true
|
|
||||||
# undef true
|
|
||||||
#endif
|
|
||||||
#ifdef false
|
|
||||||
# undef false
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "ArduinoJson/Array/JsonArray.hpp"
|
#include "ArduinoJson/Array/JsonArray.hpp"
|
||||||
#include "ArduinoJson/Object/JsonObject.hpp"
|
#include "ArduinoJson/Object/JsonObject.hpp"
|
||||||
#include "ArduinoJson/Variant/JsonVariantConst.hpp"
|
#include "ArduinoJson/Variant/JsonVariantConst.hpp"
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define ARDUINOJSON_VERSION "7.4.2"
|
#define ARDUINOJSON_VERSION "7.4.1"
|
||||||
#define ARDUINOJSON_VERSION_MAJOR 7
|
#define ARDUINOJSON_VERSION_MAJOR 7
|
||||||
#define ARDUINOJSON_VERSION_MINOR 4
|
#define ARDUINOJSON_VERSION_MINOR 4
|
||||||
#define ARDUINOJSON_VERSION_REVISION 2
|
#define ARDUINOJSON_VERSION_REVISION 1
|
||||||
#define ARDUINOJSON_VERSION_MACRO V742
|
#define ARDUINOJSON_VERSION_MACRO V741
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ run = """
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
if [ ! -d "vendor/esp32-32e/TFT_eSPI" ]; then
|
if [ ! -d "vendor/esp32-32e/TFT_eSPI" ]; then
|
||||||
echo "Cloning TFT_eSPI..."
|
echo "Cloning TFT_eSPI..."
|
||||||
git clone --depth 1 --branch 2.5.43 \
|
git clone --depth 1 --branch V2.5.43 \
|
||||||
https://github.com/Bodmer/TFT_eSPI.git \
|
https://github.com/Bodmer/TFT_eSPI.git \
|
||||||
vendor/esp32-32e/TFT_eSPI
|
vendor/esp32-32e/TFT_eSPI
|
||||||
fi
|
fi
|
||||||
@@ -81,7 +81,7 @@ description = "Compile ESP32-S3-LCD-4.3 sketch"
|
|||||||
depends = ["install-libs"]
|
depends = ["install-libs"]
|
||||||
run = """
|
run = """
|
||||||
arduino-cli compile \
|
arduino-cli compile \
|
||||||
--fqbn "esp32:esp32:waveshare_esp32_s3_touch_lcd_43:PSRAM=opi,FlashSize=16M,USBMode=hwcdc,PartitionScheme=app3M_fat9M_16MB" \
|
--fqbn "esp32:esp32:waveshare_esp32_s3_touch_lcd_43:PSRAM=enabled,FlashSize=16M,USBMode=hwcdc,PartitionScheme=app3M_fat9M_16MB" \
|
||||||
--libraries ./libraries \
|
--libraries ./libraries \
|
||||||
--libraries ./vendor/esp32-s3-lcd-43 \
|
--libraries ./vendor/esp32-s3-lcd-43 \
|
||||||
--build-property "compiler.cpp.extra_flags=-DDEBUG_MODE -DBOARD_HAS_PSRAM" \
|
--build-property "compiler.cpp.extra_flags=-DDEBUG_MODE -DBOARD_HAS_PSRAM" \
|
||||||
|
|||||||
Reference in New Issue
Block a user