mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-06-28 19:01:01 +02:00
Compare commits
5 Commits
variant-im
...
v6.21.1
Author | SHA1 | Date | |
---|---|---|---|
cb850bc1b1 | |||
481e4d2ffb | |||
9e9015f4b9 | |||
74601b2585 | |||
9bb3f4051d |
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@ -33,6 +33,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- gcc: "5"
|
||||
- gcc: "6"
|
||||
- gcc: "7"
|
||||
cxxflags: -fsanitize=leak -fno-sanitize-recover=all
|
||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -72,5 +72,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
- name: Login
|
||||
run: particle login --token ${{ secrets.PARTICLE_TOKEN }}
|
||||
timeout-minutes: 1
|
||||
- name: Publish
|
||||
run: bash -eux extras/scripts/publish-particle-library.sh
|
||||
timeout-minutes: 5
|
||||
|
@ -1,6 +1,12 @@
|
||||
ArduinoJson: change log
|
||||
=======================
|
||||
|
||||
v6.21.1 (2023-03-27)
|
||||
-------
|
||||
|
||||
* Double speed of `DynamicJsonDocument::garbageCollect()`
|
||||
* Fix compatibility with GCC 5.2 (issue #1897)
|
||||
|
||||
v6.21.0 (2023-03-14)
|
||||
-------
|
||||
|
||||
|
@ -10,7 +10,7 @@ if(ESP_PLATFORM)
|
||||
return()
|
||||
endif()
|
||||
|
||||
project(ArduinoJson VERSION 6.21.0)
|
||||
project(ArduinoJson VERSION 6.21.1)
|
||||
|
||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
||||
include(CTest)
|
||||
|
@ -8,9 +8,9 @@
|
||||
[](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/6.x)
|
||||
[](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:arduinojson)
|
||||
[](https://coveralls.io/github/bblanchon/ArduinoJson?branch=6.x)
|
||||
[](https://www.ardu-badge.com/ArduinoJson/6.21.0)
|
||||
[](https://registry.platformio.org/packages/libraries/bblanchon/ArduinoJson?version=6.21.0)
|
||||
[](https://components.espressif.com/components/bblanchon/arduinojson)
|
||||
[](https://www.ardu-badge.com/ArduinoJson/6.21.1)
|
||||
[](https://registry.platformio.org/packages/libraries/bblanchon/ArduinoJson?version=6.21.1)
|
||||
[](https://components.espressif.com/components/bblanchon/arduinojson)
|
||||
[](https://github.com/bblanchon/ArduinoJson/stargazers)
|
||||
[](https://github.com/sponsors/bblanchon)
|
||||
|
||||
@ -85,7 +85,7 @@ ArduinoJson is a C++ JSON library for Arduino and IoT (Internet Of Things).
|
||||
* [Unit test coverage close to 100%](https://coveralls.io/github/bblanchon/ArduinoJson?branch=6.x)
|
||||
* Continuously tested on
|
||||
* [Visual Studio 2017, 2019, 2022](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/6.x)
|
||||
* [GCC 6, 7, 8, 9, 10, 11](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22)
|
||||
* [GCC 5, 6, 7, 8, 9, 10, 11](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22)
|
||||
* [Clang 3.8, 3.9, 4.0, 5.0, 6.0, 7, 8, 9, 10](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)
|
||||
* Passes all default checks of [clang-tidy](https://releases.llvm.org/10.0.0/tools/clang/tools/extra/docs/clang-tidy/)
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: 6.21.0.{build}
|
||||
version: 6.21.1.{build}
|
||||
environment:
|
||||
matrix:
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
||||
|
@ -9,7 +9,7 @@ add_executable(IntegrationTests
|
||||
openweathermap.cpp
|
||||
)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 6)
|
||||
target_compile_options(IntegrationTests
|
||||
PUBLIC
|
||||
-fsingle-precision-constant # issue 544
|
||||
|
@ -24,6 +24,30 @@ TEST_CASE("deserializeJson(char*)") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("deserializeJson(unsigned char*, unsigned int)") { // issue #1897
|
||||
StaticJsonDocument<1024> doc;
|
||||
|
||||
unsigned char input[] = "{\"hello\":\"world\"}";
|
||||
unsigned char* input_ptr = input;
|
||||
unsigned int size = sizeof(input);
|
||||
|
||||
DeserializationError err = deserializeJson(doc, input_ptr, size);
|
||||
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
}
|
||||
|
||||
TEST_CASE("deserializeJson(uint8_t*, size_t)") { // issue #1898
|
||||
StaticJsonDocument<1024> doc;
|
||||
|
||||
uint8_t input[] = "{\"hello\":\"world\"}";
|
||||
uint8_t* input_ptr = input;
|
||||
size_t size = sizeof(input);
|
||||
|
||||
DeserializationError err = deserializeJson(doc, input_ptr, size);
|
||||
|
||||
REQUIRE(err == DeserializationError::Ok);
|
||||
}
|
||||
|
||||
TEST_CASE("deserializeJson(const std::string&)") {
|
||||
DynamicJsonDocument doc(4096);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: "6.21.0"
|
||||
version: "6.21.1"
|
||||
description: >-
|
||||
A simple and efficient JSON library for embedded C++.
|
||||
ArduinoJson supports ✔ serialization, ✔ deserialization, ✔ MessagePack, ✔ fixed allocation, ✔ zero-copy, ✔ streams, ✔ filtering, and more.
|
||||
|
@ -7,7 +7,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/bblanchon/ArduinoJson.git"
|
||||
},
|
||||
"version": "6.21.0",
|
||||
"version": "6.21.1",
|
||||
"authors": {
|
||||
"name": "Benoit Blanchon",
|
||||
"url": "https://blog.benoitblanchon.fr"
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=ArduinoJson
|
||||
version=6.21.0
|
||||
version=6.21.1
|
||||
author=Benoit Blanchon <blog.benoitblanchon.fr>
|
||||
maintainer=Benoit Blanchon <blog.benoitblanchon.fr>
|
||||
sentence=A simple and efficient JSON library for embedded C++.
|
||||
|
@ -12,6 +12,17 @@
|
||||
|
||||
ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE
|
||||
|
||||
// A meta-function that returns the first type of the parameter pack
|
||||
// or void if empty
|
||||
template <typename...>
|
||||
struct first_or_void {
|
||||
using type = void;
|
||||
};
|
||||
template <typename T, typename... Rest>
|
||||
struct first_or_void<T, Rest...> {
|
||||
using type = T;
|
||||
};
|
||||
|
||||
template <template <typename, typename> class TDeserializer, typename TReader,
|
||||
typename TWriter>
|
||||
TDeserializer<TReader, TWriter> makeDeserializer(MemoryPool* pool,
|
||||
@ -22,7 +33,9 @@ TDeserializer<TReader, TWriter> makeDeserializer(MemoryPool* pool,
|
||||
}
|
||||
|
||||
template <template <typename, typename> class TDeserializer, typename TStream,
|
||||
typename... Args>
|
||||
typename... Args,
|
||||
typename = typename enable_if< // issue #1897
|
||||
!is_integral<typename first_or_void<Args...>::type>::value>::type>
|
||||
DeserializationError deserialize(JsonDocument& doc, TStream&& input,
|
||||
Args... args) {
|
||||
auto reader = makeReader(detail::forward<TStream>(input));
|
||||
|
@ -127,7 +127,6 @@ class BasicJsonDocument : AllocatorOwner<TAllocator>, public JsonDocument {
|
||||
BasicJsonDocument tmp(*this);
|
||||
if (!tmp.capacity())
|
||||
return false;
|
||||
tmp.set(*this);
|
||||
moveAssignFrom(tmp);
|
||||
return true;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define ARDUINOJSON_VERSION "6.21.0"
|
||||
#define ARDUINOJSON_VERSION "6.21.1"
|
||||
#define ARDUINOJSON_VERSION_MAJOR 6
|
||||
#define ARDUINOJSON_VERSION_MINOR 21
|
||||
#define ARDUINOJSON_VERSION_REVISION 0
|
||||
#define ARDUINOJSON_VERSION_REVISION 1
|
||||
|
Reference in New Issue
Block a user