New ArduinoJson library

New Synth_Dexed library
Small fixes.
dev
Holger Wirtz 1 year ago
parent 6b74d11b4d
commit 29024b356e
  1. 1
      UI.hpp
  2. 2
      third-party/ArduinoJson/ArduinoJson.h
  3. 7
      third-party/ArduinoJson/CHANGELOG.md
  4. 12
      third-party/ArduinoJson/CMakeLists.txt
  5. 2
      third-party/ArduinoJson/LICENSE.txt
  6. 15
      third-party/ArduinoJson/README.md
  7. 11
      third-party/ArduinoJson/appveyor.yml
  8. 2
      third-party/ArduinoJson/examples/JsonConfigFile/JsonConfigFile.ino
  9. 2
      third-party/ArduinoJson/examples/JsonFilterExample/JsonFilterExample.ino
  10. 2
      third-party/ArduinoJson/examples/JsonGeneratorExample/JsonGeneratorExample.ino
  11. 2
      third-party/ArduinoJson/examples/JsonHttpClient/JsonHttpClient.ino
  12. 2
      third-party/ArduinoJson/examples/JsonParserExample/JsonParserExample.ino
  13. 2
      third-party/ArduinoJson/examples/JsonServer/JsonServer.ino
  14. 2
      third-party/ArduinoJson/examples/JsonUdpBeacon/JsonUdpBeacon.ino
  15. 2
      third-party/ArduinoJson/examples/MsgPackParser/MsgPackParser.ino
  16. 2
      third-party/ArduinoJson/examples/ProgmemExample/ProgmemExample.ino
  17. 2
      third-party/ArduinoJson/examples/StringExample/StringExample.ino
  18. 18
      third-party/ArduinoJson/extras/CompileOptions.cmake
  19. 2
      third-party/ArduinoJson/extras/ci/espidf/CMakeLists.txt
  20. 8
      third-party/ArduinoJson/extras/ci/espidf/main/CMakeLists.txt
  21. 2
      third-party/ArduinoJson/extras/ci/espidf/main/main.cpp
  22. 2
      third-party/ArduinoJson/extras/conf_test/avr.cpp
  23. 2
      third-party/ArduinoJson/extras/conf_test/esp8266.cpp
  24. 2
      third-party/ArduinoJson/extras/conf_test/x64.cpp
  25. 2
      third-party/ArduinoJson/extras/conf_test/x86.cpp
  26. 25
      third-party/ArduinoJson/extras/fuzzing/CMakeLists.txt
  27. 2
      third-party/ArduinoJson/extras/fuzzing/Makefile
  28. 2
      third-party/ArduinoJson/extras/fuzzing/reproducer.cpp
  29. 3
      third-party/ArduinoJson/extras/scripts/build-single-header.sh
  30. 2
      third-party/ArduinoJson/extras/scripts/publish.sh
  31. 2
      third-party/ArduinoJson/extras/scripts/wandbox/JsonGeneratorExample.cpp
  32. 2
      third-party/ArduinoJson/extras/scripts/wandbox/JsonParserExample.cpp
  33. 2
      third-party/ArduinoJson/extras/scripts/wandbox/MsgPackParserExample.cpp
  34. 5
      third-party/ArduinoJson/extras/tests/CMakeLists.txt
  35. 36
      third-party/ArduinoJson/extras/tests/Cpp11/CMakeLists.txt
  36. 4
      third-party/ArduinoJson/extras/tests/Cpp17/CMakeLists.txt
  37. 4
      third-party/ArduinoJson/extras/tests/Cpp17/string_view.cpp
  38. 4
      third-party/ArduinoJson/extras/tests/Cpp20/CMakeLists.txt
  39. 24
      third-party/ArduinoJson/extras/tests/FailingBuilds/CMakeLists.txt
  40. 2
      third-party/ArduinoJson/extras/tests/FailingBuilds/Issue1189.cpp
  41. 2
      third-party/ArduinoJson/extras/tests/FailingBuilds/Issue978.cpp
  42. 2
      third-party/ArduinoJson/extras/tests/FailingBuilds/assign_char.cpp
  43. 2
      third-party/ArduinoJson/extras/tests/FailingBuilds/delete_jsondocument.cpp
  44. 6
      third-party/ArduinoJson/extras/tests/FailingBuilds/read_long_long.cpp
  45. 2
      third-party/ArduinoJson/extras/tests/FailingBuilds/variant_as_char.cpp
  46. 6
      third-party/ArduinoJson/extras/tests/FailingBuilds/write_long_long.cpp
  47. 2
      third-party/ArduinoJson/extras/tests/Helpers/Arduino.h
  48. 6
      third-party/ArduinoJson/extras/tests/Helpers/CustomReader.hpp
  49. 2
      third-party/ArduinoJson/extras/tests/Helpers/api/Print.h
  50. 2
      third-party/ArduinoJson/extras/tests/Helpers/api/Stream.h
  51. 2
      third-party/ArduinoJson/extras/tests/Helpers/api/String.h
  52. 8
      third-party/ArduinoJson/extras/tests/Helpers/progmem_emulation.hpp
  53. 6
      third-party/ArduinoJson/extras/tests/IntegrationTests/CMakeLists.txt
  54. 2
      third-party/ArduinoJson/extras/tests/IntegrationTests/gbathree.cpp
  55. 2
      third-party/ArduinoJson/extras/tests/IntegrationTests/issue772.cpp
  56. 2
      third-party/ArduinoJson/extras/tests/IntegrationTests/openweathermap.cpp
  57. 2
      third-party/ArduinoJson/extras/tests/IntegrationTests/round_trip.cpp
  58. 4
      third-party/ArduinoJson/extras/tests/JsonArray/CMakeLists.txt
  59. 2
      third-party/ArduinoJson/extras/tests/JsonArray/add.cpp
  60. 2
      third-party/ArduinoJson/extras/tests/JsonArray/clear.cpp
  61. 2
      third-party/ArduinoJson/extras/tests/JsonArray/compare.cpp
  62. 2
      third-party/ArduinoJson/extras/tests/JsonArray/copyArray.cpp
  63. 2
      third-party/ArduinoJson/extras/tests/JsonArray/createNested.cpp
  64. 2
      third-party/ArduinoJson/extras/tests/JsonArray/equals.cpp
  65. 2
      third-party/ArduinoJson/extras/tests/JsonArray/isNull.cpp
  66. 2
      third-party/ArduinoJson/extras/tests/JsonArray/iterator.cpp
  67. 2
      third-party/ArduinoJson/extras/tests/JsonArray/memoryUsage.cpp
  68. 2
      third-party/ArduinoJson/extras/tests/JsonArray/nesting.cpp
  69. 2
      third-party/ArduinoJson/extras/tests/JsonArray/remove.cpp
  70. 2
      third-party/ArduinoJson/extras/tests/JsonArray/size.cpp
  71. 2
      third-party/ArduinoJson/extras/tests/JsonArray/std_string.cpp
  72. 2
      third-party/ArduinoJson/extras/tests/JsonArray/subscript.cpp
  73. 2
      third-party/ArduinoJson/extras/tests/JsonArray/unbound.cpp
  74. 4
      third-party/ArduinoJson/extras/tests/JsonDeserializer/CMakeLists.txt
  75. 4
      third-party/ArduinoJson/extras/tests/JsonDeserializer/DeserializationError.cpp
  76. 2
      third-party/ArduinoJson/extras/tests/JsonDeserializer/array.cpp
  77. 2
      third-party/ArduinoJson/extras/tests/JsonDeserializer/array_static.cpp
  78. 2
      third-party/ArduinoJson/extras/tests/JsonDeserializer/filter.cpp
  79. 2
      third-party/ArduinoJson/extras/tests/JsonDeserializer/incomplete_input.cpp
  80. 2
      third-party/ArduinoJson/extras/tests/JsonDeserializer/input_types.cpp
  81. 2
      third-party/ArduinoJson/extras/tests/JsonDeserializer/invalid_input.cpp
  82. 2
      third-party/ArduinoJson/extras/tests/JsonDeserializer/misc.cpp
  83. 4
      third-party/ArduinoJson/extras/tests/JsonDeserializer/nestingLimit.cpp
  84. 6
      third-party/ArduinoJson/extras/tests/JsonDeserializer/number.cpp
  85. 2
      third-party/ArduinoJson/extras/tests/JsonDeserializer/object.cpp
  86. 2
      third-party/ArduinoJson/extras/tests/JsonDeserializer/object_static.cpp
  87. 2
      third-party/ArduinoJson/extras/tests/JsonDeserializer/string.cpp
  88. 11
      third-party/ArduinoJson/extras/tests/JsonDocument/BasicJsonDocument.cpp
  89. 5
      third-party/ArduinoJson/extras/tests/JsonDocument/CMakeLists.txt
  90. 4
      third-party/ArduinoJson/extras/tests/JsonDocument/DynamicJsonDocument.cpp
  91. 4
      third-party/ArduinoJson/extras/tests/JsonDocument/ElementProxy.cpp
  92. 4
      third-party/ArduinoJson/extras/tests/JsonDocument/MemberProxy.cpp
  93. 2
      third-party/ArduinoJson/extras/tests/JsonDocument/StaticJsonDocument.cpp
  94. 2
      third-party/ArduinoJson/extras/tests/JsonDocument/add.cpp
  95. 2
      third-party/ArduinoJson/extras/tests/JsonDocument/cast.cpp
  96. 2
      third-party/ArduinoJson/extras/tests/JsonDocument/compare.cpp
  97. 2
      third-party/ArduinoJson/extras/tests/JsonDocument/containsKey.cpp
  98. 2
      third-party/ArduinoJson/extras/tests/JsonDocument/createNested.cpp
  99. 2
      third-party/ArduinoJson/extras/tests/JsonDocument/isNull.cpp
  100. 0
      third-party/ArduinoJson/extras/tests/JsonDocument/issue1120.cpp
  101. Some files were not shown because too many files have changed in this diff Show More

@ -4912,6 +4912,7 @@ void UI_func_engine(uint8_t param) {
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
lcd_special_chars(SCROLLBAR);
encoderDir[ENC_R].reset();
}
}

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include "src/ArduinoJson.h"

@ -1,6 +1,13 @@
ArduinoJson: change log
=======================
v6.21.0 (2023-03-14)
-------
* Drop support for C++98/C++03. Minimum required is C++11.
* Remove `ARDUINOJSON_NAMESPACE`; use `ArduinoJson` instead.
* Make string support generic (issue #1807)
v6.20.1 (2023-02-08)
-------

@ -1,19 +1,19 @@
# ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON
# Copyright © 2014-2023, Benoit BLANCHON
# MIT License
cmake_minimum_required(VERSION 3.15)
if(ESP_PLATFORM)
# Build ArduinoJson as an ESP-IDF component
idf_component_register(INCLUDE_DIRS src)
return()
# Build ArduinoJson as an ESP-IDF component
idf_component_register(INCLUDE_DIRS src)
return()
endif()
project(ArduinoJson VERSION 6.20.1)
project(ArduinoJson VERSION 6.21.0)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
include(CTest)
include(CTest)
endif()
add_subdirectory(src)

@ -1,7 +1,7 @@
The MIT License (MIT)
---------------------
Copyright © 2014-2022, Benoit BLANCHON
Copyright © 2014-2023, Benoit BLANCHON
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@ -8,9 +8,9 @@
[![Continuous Integration](https://ci.appveyor.com/api/projects/status/m7s53wav1l0abssg/branch/6.x?svg=true)](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/6.x)
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/arduinojson.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:arduinojson)
[![Coveralls branch](https://img.shields.io/coveralls/github/bblanchon/ArduinoJson/6.x?logo=coveralls)](https://coveralls.io/github/bblanchon/ArduinoJson?branch=6.x)
[![Arduino Library Manager](https://img.shields.io/static/v1?label=Arduino&message=v6.20.1&logo=arduino&logoColor=white&color=blue)](https://www.ardu-badge.com/ArduinoJson/6.20.1)
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/bblanchon/library/ArduinoJson.svg?version=6.20.1)](https://registry.platformio.org/packages/libraries/bblanchon/ArduinoJson?version=6.20.1)
[![ESP IDF](https://img.shields.io/static/v1?label=ESP+IDF&message=v6.20.1&logo=cpu&logoColor=white&color=blue)](https://components.espressif.com/components/bblanchon/arduinojson)
[![Arduino Library Manager](https://img.shields.io/static/v1?label=Arduino&message=v6.21.0&logo=arduino&logoColor=white&color=blue)](https://www.ardu-badge.com/ArduinoJson/6.21.0)
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/bblanchon/library/ArduinoJson.svg?version=6.21.0)](https://registry.platformio.org/packages/libraries/bblanchon/ArduinoJson?version=6.21.0)
[![ESP IDF](https://img.shields.io/static/v1?label=ESP+IDF&message=v6.21.0&logo=cpu&logoColor=white&color=blue)](https://components.espressif.com/components/bblanchon/arduinojson)
[![GitHub stars](https://img.shields.io/github/stars/bblanchon/ArduinoJson?style=flat&logo=github&color=orange)](https://github.com/bblanchon/ArduinoJson/stargazers)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/bblanchon?logo=github&color=orange)](https://github.com/sponsors/bblanchon)
@ -46,7 +46,8 @@ ArduinoJson is a C++ JSON library for Arduino and IoT (Internet Of Things).
* Supports [custom converters](https://arduinojson.org/news/2021/05/04/version-6-18-0/)
* Portable
* Usable on any C++ project (not limited to Arduino)
* Compatible with C++98, C++11, C++14 and C++17
* Compatible with C++11, C++14 and C++17
* Support for C++98/C++03 available on [ArduinoJson 6.20.x](https://github.com/bblanchon/ArduinoJson/tree/6.20.x)
* Zero warnings with `-Wall -Wextra -pedantic` and `/W4`
* [Header-only library](https://en.wikipedia.org/wiki/Header-only)
* Works with virtually any board
@ -83,9 +84,9 @@ ArduinoJson is a C++ JSON library for Arduino and IoT (Internet Of Things).
* Well tested
* [Unit test coverage close to 100%](https://coveralls.io/github/bblanchon/ArduinoJson?branch=6.x)
* Continuously tested on
* [Visual Studio 2010, 2012, 2013, 2015, 2017, 2019, 2022](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/6.x)
* [GCC 4.4, 4.6, 4.7, 4.8, 4.9, 5, 6, 7, 8, 9, 10, 11](https://github.com/bblanchon/ArduinoJson/actions?query=workflow%3A%22Continuous+Integration%22)
* [Clang 3.5, 3.6, 3.7, 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)
* [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)
* [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/)
* Well documented

@ -1,4 +1,4 @@
version: 6.20.1.{build}
version: 6.21.0.{build}
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
@ -7,15 +7,6 @@ environment:
CMAKE_GENERATOR: Visual Studio 16 2019
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_GENERATOR: Visual Studio 15 2017
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
CMAKE_GENERATOR: Visual Studio 14 2015
- CMAKE_GENERATOR: Visual Studio 12 2013
- CMAKE_GENERATOR: Visual Studio 11 2012
- CMAKE_GENERATOR: Visual Studio 10 2010
- CMAKE_GENERATOR: Ninja
MINGW: MinGW # MinGW 32-bit 5.3.0
- CMAKE_GENERATOR: Ninja
MINGW32: i686-5.3.0-posix-dwarf-rt_v4-rev0 # MinGW-w64 5.3.0
- CMAKE_GENERATOR: Ninja
MINGW32: i686-6.3.0-posix-dwarf-rt_v5-rev1 # MinGW-w64 6.3.0 i686
- CMAKE_GENERATOR: Ninja

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
//
// This example shows how to store your project configuration in a file.

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
//
// This example shows how to use DeserializationOption::Filter

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
//
// This example shows how to generate a JSON document with ArduinoJson.

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
//
// This example shows how to parse a JSON document in an HTTP response.

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
//
// This example shows how to deserialize a JSON document with ArduinoJson.

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
//
// This example shows how to implement an HTTP server that sends a JSON document

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
//
// This example shows how to send a JSON document to a UDP socket.

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
//
// This example shows how to deserialize a MessagePack document with

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
//
// This example shows the different ways you can use Flash strings with

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
//
// This example shows the different ways you can use String with ArduinoJson.

@ -27,11 +27,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
if(${COVERAGE})
set(CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage")
endif()
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8) AND (NOT ${COVERAGE}))
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8) AND(NOT ${COVERAGE}))
add_compile_options(-g -Og)
else()
add_compile_options(-g -O0)
@ -65,7 +64,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.0) AND (NOT ${COVERAGE}))
if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.0) AND(NOT ${COVERAGE}))
add_compile_options(-g -Og)
else()
add_compile_options(-g -O0)
@ -73,7 +72,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0) AND (NOT ${COVERAGE}))
if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0) AND(NOT ${COVERAGE}))
add_compile_options(-g -Og)
else()
add_compile_options(-g -O0)
@ -85,17 +84,12 @@ if(MSVC)
add_compile_options(
/W4 # Set warning level
/WX # Treats all compiler warnings as errors.
/Zc:__cplusplus # Enable updated __cplusplus macro
)
if (NOT MSVC_VERSION LESS 1910) # >= Visual Studio 2017
add_compile_options(
/Zc:__cplusplus # Enable updated __cplusplus macro
)
endif()
endif()
if(MINGW)
# Static link on MinGW to avoid linking with the wrong DLLs when multiple
# Static link on MinGW to avoid linking with the wrong DLLs when multiple
# versions are installed.
add_link_options(-static)
endif()

@ -1,5 +1,5 @@
# ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON
# Copyright © 2014-2023, Benoit BLANCHON
# MIT License
cmake_minimum_required(VERSION 3.5)

@ -1,6 +1,8 @@
# ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON
# Copyright © 2014-2023, Benoit BLANCHON
# MIT License
idf_component_register(SRCS "main.cpp"
INCLUDE_DIRS "")
idf_component_register(
SRCS "main.cpp"
INCLUDE_DIRS ""
)

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -9,7 +9,7 @@ static_assert(ARDUINOJSON_LITTLE_ENDIAN == 1, "ARDUINOJSON_LITTLE_ENDIAN");
static_assert(ARDUINOJSON_USE_DOUBLE == 1, "ARDUINOJSON_USE_DOUBLE");
static_assert(sizeof(ARDUINOJSON_NAMESPACE::VariantSlot) == 8,
static_assert(sizeof(ArduinoJson::detail::VariantSlot) == 8,
"sizeof(VariantSlot)");
void setup() {}

@ -9,7 +9,7 @@ static_assert(ARDUINOJSON_LITTLE_ENDIAN == 1, "ARDUINOJSON_LITTLE_ENDIAN");
static_assert(ARDUINOJSON_USE_DOUBLE == 1, "ARDUINOJSON_USE_DOUBLE");
static_assert(sizeof(ARDUINOJSON_NAMESPACE::VariantSlot) == 16,
static_assert(sizeof(ArduinoJson::detail::VariantSlot) == 16,
"sizeof(VariantSlot)");
void setup() {}

@ -9,7 +9,7 @@ static_assert(ARDUINOJSON_LITTLE_ENDIAN == 1, "ARDUINOJSON_LITTLE_ENDIAN");
static_assert(ARDUINOJSON_USE_DOUBLE == 1, "ARDUINOJSON_USE_DOUBLE");
static_assert(sizeof(ARDUINOJSON_NAMESPACE::VariantSlot) == 32,
static_assert(sizeof(ArduinoJson::detail::VariantSlot) == 32,
"sizeof(VariantSlot)");
int main() {}

@ -9,7 +9,7 @@ static_assert(ARDUINOJSON_LITTLE_ENDIAN == 1, "ARDUINOJSON_LITTLE_ENDIAN");
static_assert(ARDUINOJSON_USE_DOUBLE == 1, "ARDUINOJSON_USE_DOUBLE");
static_assert(sizeof(ARDUINOJSON_NAMESPACE::VariantSlot) == 16,
static_assert(sizeof(ArduinoJson::detail::VariantSlot) == 16,
"sizeof(VariantSlot)");
int main() {}

@ -1,7 +1,10 @@
# ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON
# Copyright © 2014-2023, Benoit BLANCHON
# MIT License
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(MSVC)
add_compile_options(-D_CRT_SECURE_NO_WARNINGS)
endif()
@ -22,7 +25,7 @@ target_link_libraries(json_reproducer
ArduinoJson
)
macro(add_fuzzer name)
macro(add_fuzzer name)
set(FUZZER "${name}_fuzzer")
set(CORPUS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${name}_corpus")
set(SEED_CORPUS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${name}_seed_corpus")
@ -33,27 +36,23 @@ macro(add_fuzzer name)
ArduinoJson
)
set_target_properties("${FUZZER}"
PROPERTIES
COMPILE_FLAGS
"-fprofile-instr-generate -fcoverage-mapping -fsanitize=fuzzer -fno-sanitize-recover=all"
LINK_FLAGS
"-fprofile-instr-generate -fcoverage-mapping -fsanitize=fuzzer -fno-sanitize-recover=all"
PROPERTIES
COMPILE_FLAGS "-fprofile-instr-generate -fcoverage-mapping -fsanitize=fuzzer -fno-sanitize-recover=all"
LINK_FLAGS "-fprofile-instr-generate -fcoverage-mapping -fsanitize=fuzzer -fno-sanitize-recover=all"
)
add_test(
NAME
"${FUZZER}"
COMMAND
"${FUZZER}" "${CORPUS_DIR}" "${SEED_CORPUS_DIR}" -max_total_time=5 -timeout=1
NAME "${FUZZER}"
COMMAND "${FUZZER}" "${CORPUS_DIR}" "${SEED_CORPUS_DIR}" -max_total_time=5 -timeout=1
)
set_tests_properties("${FUZZER}"
PROPERTIES
LABELS "Fuzzing"
LABELS "Fuzzing"
)
endmacro()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6)
add_fuzzer(json)
add_fuzzer(msgpack)
endif()

@ -1,6 +1,6 @@
# CAUTION: this file is invoked by https://github.com/google/oss-fuzz
CXXFLAGS += -I../../src -DARDUINOJSON_DEBUG=1
CXXFLAGS += -I../../src -DARDUINOJSON_DEBUG=1 -std=c++11
all: \
$(OUT)/json_fuzzer \

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
// This file is NOT use by Google's OSS fuzz

@ -53,7 +53,8 @@ process()
}
simplify_namespaces() {
perl -p0i -e 's|\} // namespace ARDUINOJSON_NAMESPACE\r?\nnamespace ARDUINOJSON_NAMESPACE \{\r?\n||igs' "$1"
perl -p0i -e 's|ARDUINOJSON_END_PUBLIC_NAMESPACE\r?\nARDUINOJSON_BEGIN_PUBLIC_NAMESPACE\r?\n||igs' "$1"
perl -p0i -e 's|ARDUINOJSON_END_PRIVATE_NAMESPACE\r?\nARDUINOJSON_BEGIN_PRIVATE_NAMESPACE\r?\n||igs' "$1"
rm -f "$1.bak"
}

@ -51,7 +51,7 @@ update_version_in_source () {
}
commit_new_version () {
git add src/ArduinoJson/version.hpp README.md CHANGELOG.md library.json library.properties appveyor.yml CMakeLists.txt
git add src/ArduinoJson/version.hpp README.md CHANGELOG.md library.json library.properties appveyor.yml CMakeLists.txt idf_component.yml
git commit -m "Set version to $VERSION"
}

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
//
// This example shows how to generate a JSON document with ArduinoJson.

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
//
// This example shows how to deserialize a JSON document with ArduinoJson.

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
//
// This example shows how to generate a JSON document with ArduinoJson.

@ -1,8 +1,8 @@
# ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON
# Copyright © 2014-2023, Benoit BLANCHON
# MIT License
set(CMAKE_CXX_STANDARD 98)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_subdirectory(catch)
@ -10,7 +10,6 @@ add_subdirectory(catch)
link_libraries(ArduinoJson catch)
include_directories(Helpers)
add_subdirectory(Cpp11)
add_subdirectory(Cpp17)
add_subdirectory(Cpp20)
add_subdirectory(FailingBuilds)

@ -1,36 +0,0 @@
# ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON
# MIT License
if("cxx_nullptr" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
list(APPEND SOURCES nullptr.cpp)
add_definitions(-DARDUINOJSON_HAS_NULLPTR=1)
endif()
if("cxx_auto_type" IN_LIST CMAKE_CXX_COMPILE_FEATURES AND "cxx_constexpr" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
list(APPEND SOURCES issue1120.cpp)
endif()
if("cxx_long_long_type" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
list(APPEND SOURCES use_long_long_0.cpp use_long_long_1.cpp)
endif()
if("cxx_range_for" IN_LIST CMAKE_CXX_COMPILE_FEATURES AND "cxx_generalized_initializers" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
list(APPEND SOURCES stl_containers.cpp)
endif()
if(NOT SOURCES)
return()
endif()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(Cpp11Tests ${SOURCES})
add_test(Cpp11 Cpp11Tests)
set_tests_properties(Cpp11
PROPERTIES
LABELS "Catch"
)

@ -1,5 +1,5 @@
# ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON
# Copyright © 2014-2023, Benoit BLANCHON
# MIT License
if(MSVC_VERSION LESS 1910)
@ -25,5 +25,5 @@ add_test(Cpp17 Cpp17Tests)
set_tests_properties(Cpp17
PROPERTIES
LABELS "Catch"
LABELS "Catch"
)

@ -1,6 +1,6 @@
#include <ArduinoJson.h>
#include <catch.hpp>
#include <string_view>
#if !ARDUINOJSON_ENABLE_STRING_VIEW
@ -86,7 +86,7 @@ TEST_CASE("string_view") {
}
}
using ARDUINOJSON_NAMESPACE::adaptString;
using ArduinoJson::detail::adaptString;
TEST_CASE("StringViewAdapter") {
std::string_view str("bravoXXX", 5);

@ -1,5 +1,5 @@
# ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON
# Copyright © 2014-2023, Benoit BLANCHON
# MIT License
if(MSVC_VERSION LESS 1910)
@ -25,5 +25,5 @@ add_test(Cpp20 Cpp20Tests)
set_tests_properties(Cpp20
PROPERTIES
LABELS "Catch"
LABELS "Catch"
)

@ -1,29 +1,25 @@
# ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON
# Copyright © 2014-2023, Benoit BLANCHON
# MIT License
macro(build_should_fail target)
set_target_properties(${target}
PROPERTIES
EXCLUDE_FROM_ALL TRUE
EXCLUDE_FROM_DEFAULT_BUILD TRUE
EXCLUDE_FROM_ALL TRUE
EXCLUDE_FROM_DEFAULT_BUILD TRUE
)
add_test(
NAME
${target}
COMMAND
${CMAKE_COMMAND} --build . --target ${target} --config $<CONFIGURATION>
WORKING_DIRECTORY
${CMAKE_BINARY_DIR}
NAME ${target}
COMMAND ${CMAKE_COMMAND} --build . --target ${target} --config $<CONFIGURATION>
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
set_tests_properties(${target}
set_tests_properties(${target}
PROPERTIES
WILL_FAIL TRUE
LABELS "WillFail;Catch"
WILL_FAIL TRUE
LABELS "WillFail;Catch"
)
endmacro()
add_executable(Issue978 Issue978.cpp)
build_should_fail(Issue978)
@ -31,11 +27,9 @@ add_executable(Issue1189 Issue1189.cpp)
build_should_fail(Issue1189)
add_executable(read_long_long read_long_long.cpp)
set_property(TARGET read_long_long PROPERTY CXX_STANDARD 11)
build_should_fail(read_long_long)
add_executable(write_long_long write_long_long.cpp)
set_property(TARGET write_long_long PROPERTY CXX_STANDARD 11)
build_should_fail(write_long_long)
add_executable(delete_jsondocument delete_jsondocument.cpp)

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#define ARDUINOJSON_USE_LONG_LONG 0
@ -9,10 +9,6 @@
# error This test requires sizeof(long) < 8
#endif
#if !ARDUINOJSON_HAS_LONG_LONG
# error This test requires C++11
#endif
ARDUINOJSON_ASSERT_INTEGER_TYPE_IS_SUPPORTED(long long)
int main() {
DynamicJsonDocument doc(1024);

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#define ARDUINOJSON_USE_LONG_LONG 0
@ -9,10 +9,6 @@
# error This test requires sizeof(long) < 8
#endif
#if !ARDUINOJSON_HAS_LONG_LONG
# error This test requires C++11
#endif
int main() {
DynamicJsonDocument doc(1024);
doc["dummy"] = static_cast<long long>(42);

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#pragma once

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#pragma once
@ -11,6 +11,7 @@ class CustomReader {
public:
CustomReader(const char* input) : _stream(input) {}
CustomReader(const CustomReader&) = delete;
int read() {
return _stream.get();
@ -20,7 +21,4 @@ class CustomReader {
_stream.read(buffer, static_cast<std::streamsize>(length));
return static_cast<size_t>(_stream.gcount());
}
private:
CustomReader(const CustomReader&);
};

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#pragma once

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#pragma once

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#pragma once

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <stdint.h> // uint8_t
@ -23,7 +23,7 @@ inline uint8_t pgm_read_byte(const void* p) {
return *reinterpret_cast<const uint8_t*>(convertFlashToPtr(p));
}
#define ARDUINOJSON_DEFINE_PROGMEM_ARRAY(type, name, value) \
static type const ARDUINOJSON_CONCAT2(name, _progmem)[] = value; \
static type const* name = reinterpret_cast<type const*>( \
#define ARDUINOJSON_DEFINE_PROGMEM_ARRAY(type, name, ...) \
static type const ARDUINOJSON_CONCAT2(name, _progmem)[] = __VA_ARGS__; \
static type const* name = reinterpret_cast<type const*>( \
convertPtrToFlash(ARDUINOJSON_CONCAT2(name, _progmem)));

@ -1,5 +1,5 @@
# ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON
# Copyright © 2014-2023, Benoit BLANCHON
# MIT License
add_executable(IntegrationTests
@ -12,7 +12,7 @@ add_executable(IntegrationTests
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_compile_options(IntegrationTests
PUBLIC
-fsingle-precision-constant # issue 544
-fsingle-precision-constant # issue 544
)
endif()
@ -20,5 +20,5 @@ add_test(IntegrationTests IntegrationTests)
set_tests_properties(IntegrationTests
PROPERTIES
LABELS "Catch"
LABELS "Catch"
)

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
# ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON
# Copyright © 2014-2023, Benoit BLANCHON
# MIT License
add_executable(JsonArrayTests
@ -24,5 +24,5 @@ add_test(JsonArray JsonArrayTests)
set_tests_properties(JsonArray
PROPERTIES
LABELS "Catch"
LABELS "Catch"
)

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
# ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON
# Copyright © 2014-2023, Benoit BLANCHON
# MIT License
add_executable(JsonDeserializerTests
@ -24,5 +24,5 @@ add_test(JsonDeserializer JsonDeserializerTests)
set_tests_properties(JsonDeserializer
PROPERTIES
LABELS "Catch"
LABELS "Catch"
)

@ -1,10 +1,12 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>
#include <catch.hpp>
#include <sstream>
void testStringification(DeserializationError error, std::string expected) {
REQUIRE(error.c_str() == expected);
}

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#define ARDUINOJSON_ENABLE_COMMENTS 1

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#define ARDUINOJSON_DECODE_UNICODE 1

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#define ARDUINOJSON_DECODE_UNICODE 1

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,10 +1,12 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>
#include <catch.hpp>
#include <sstream>
#define SHOULD_WORK(expression) REQUIRE(DeserializationError::Ok == expression);
#define SHOULD_FAIL(expression) \
REQUIRE(DeserializationError::TooDeep == expression);

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#define ARDUINOJSON_USE_LONG_LONG 0
@ -11,8 +11,8 @@
#include <catch.hpp>
namespace my {
using ARDUINOJSON_NAMESPACE::isinf;
using ARDUINOJSON_NAMESPACE::isnan;
using ArduinoJson::detail::isinf;
using ArduinoJson::detail::isnan;
} // namespace my
TEST_CASE("deserialize an integer") {

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#define ARDUINOJSON_DECODE_UNICODE 1

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>
@ -8,12 +8,11 @@
#include <sstream>
#include <utility>
using ARDUINOJSON_NAMESPACE::addPadding;
class SpyingAllocator {
public:
SpyingAllocator(const SpyingAllocator& src) : _log(src._log) {}
SpyingAllocator(std::ostream& log) : _log(log) {}
SpyingAllocator& operator=(const SpyingAllocator& src) = delete;
void* allocate(size_t n) {
_log << "A" << n;
@ -25,8 +24,6 @@ class SpyingAllocator {
}
private:
SpyingAllocator& operator=(const SpyingAllocator& src);
std::ostream& _log;
};
@ -72,7 +69,6 @@ TEST_CASE("BasicJsonDocument") {
REQUIRE(log.str() == "A4096A4096FF");
}
#if ARDUINOJSON_HAS_RVALUE_REFERENCES
SECTION("Move construct") {
{
BasicJsonDocument<SpyingAllocator> doc1(4096, log);
@ -87,7 +83,6 @@ TEST_CASE("BasicJsonDocument") {
}
REQUIRE(log.str() == "A4096F");
}
#endif
SECTION("Copy assign larger") {
{
@ -134,7 +129,6 @@ TEST_CASE("BasicJsonDocument") {
REQUIRE(log.str() == "A1024A1024FF");
}
#if ARDUINOJSON_HAS_RVALUE_REFERENCES
SECTION("Move assign") {
{
BasicJsonDocument<SpyingAllocator> doc1(4096, log);
@ -150,7 +144,6 @@ TEST_CASE("BasicJsonDocument") {
}
REQUIRE(log.str() == "A4096A8FF");
}
#endif
SECTION("garbageCollect()") {
BasicJsonDocument<ControllableAllocator> doc(4096);

@ -1,5 +1,5 @@
# ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON
# Copyright © 2014-2023, Benoit BLANCHON
# MIT License
add_executable(JsonDocumentTests
@ -12,6 +12,7 @@ add_executable(JsonDocumentTests
DynamicJsonDocument.cpp
ElementProxy.cpp
isNull.cpp
issue1120.cpp
MemberProxy.cpp
nesting.cpp
overflowed.cpp
@ -27,5 +28,5 @@ add_test(JsonDocument JsonDocumentTests)
set_tests_properties(JsonDocument
PROPERTIES
LABELS "Catch"
LABELS "Catch"
)

@ -1,11 +1,11 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>
#include <catch.hpp>
using ARDUINOJSON_NAMESPACE::addPadding;
using ArduinoJson::detail::addPadding;
static void REQUIRE_JSON(JsonDocument& doc, const std::string& expected) {
std::string json;

@ -1,11 +1,11 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>
#include <catch.hpp>
typedef ARDUINOJSON_NAMESPACE::ElementProxy<JsonDocument&> ElementProxy;
typedef ArduinoJson::detail::ElementProxy<JsonDocument&> ElementProxy;
TEST_CASE("ElementProxy::add()") {
DynamicJsonDocument doc(4096);

@ -1,11 +1,11 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>
#include <catch.hpp>
typedef ARDUINOJSON_NAMESPACE::MemberProxy<JsonDocument&, const char*>
typedef ArduinoJson::detail::MemberProxy<JsonDocument&, const char*>
MemberProxy;
TEST_CASE("MemberProxy::add()") {

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// Copyright © 2014-2023, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save