New ArduinoJson library

New Synth_Dexed library
Small fixes.
dev
Holger Wirtz 2 years ago
parent 6b74d11b4d
commit 29024b356e
  1. 1
      UI.hpp
  2. 2
      third-party/ArduinoJson/ArduinoJson.h
  3. 7
      third-party/ArduinoJson/CHANGELOG.md
  4. 4
      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. 12
      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. 19
      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. 2
      third-party/ArduinoJson/extras/tests/Cpp17/CMakeLists.txt
  37. 4
      third-party/ArduinoJson/extras/tests/Cpp17/string_view.cpp
  38. 2
      third-party/ArduinoJson/extras/tests/Cpp20/CMakeLists.txt
  39. 14
      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. 6
      third-party/ArduinoJson/extras/tests/Helpers/progmem_emulation.hpp
  53. 2
      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. 2
      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. 2
      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. 3
      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 ********* if (LCDML.FUNC_close()) // ****** STABLE END *********
{ {
lcd_special_chars(SCROLLBAR);
encoderDir[ENC_R].reset(); encoderDir[ENC_R].reset();
} }
} }

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

@ -1,6 +1,13 @@
ArduinoJson: change log 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) v6.20.1 (2023-02-08)
------- -------

@ -1,5 +1,5 @@
# ArduinoJson - https://arduinojson.org # ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON # Copyright © 2014-2023, Benoit BLANCHON
# MIT License # MIT License
cmake_minimum_required(VERSION 3.15) cmake_minimum_required(VERSION 3.15)
@ -10,7 +10,7 @@ if(ESP_PLATFORM)
return() return()
endif() endif()
project(ArduinoJson VERSION 6.20.1) project(ArduinoJson VERSION 6.21.0)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
include(CTest) include(CTest)

@ -1,7 +1,7 @@
The MIT License (MIT) 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: 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) [![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) [![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) [![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) [![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.20.1)](https://registry.platformio.org/packages/libraries/bblanchon/ArduinoJson?version=6.20.1) [![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.20.1&logo=cpu&logoColor=white&color=blue)](https://components.espressif.com/components/bblanchon/arduinojson) [![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 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) [![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/) * Supports [custom converters](https://arduinojson.org/news/2021/05/04/version-6-18-0/)
* Portable * Portable
* Usable on any C++ project (not limited to Arduino) * 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` * Zero warnings with `-Wall -Wextra -pedantic` and `/W4`
* [Header-only library](https://en.wikipedia.org/wiki/Header-only) * [Header-only library](https://en.wikipedia.org/wiki/Header-only)
* Works with virtually any board * Works with virtually any board
@ -83,9 +84,9 @@ ArduinoJson is a C++ JSON library for Arduino and IoT (Internet Of Things).
* Well tested * Well tested
* [Unit test coverage close to 100%](https://coveralls.io/github/bblanchon/ArduinoJson?branch=6.x) * [Unit test coverage close to 100%](https://coveralls.io/github/bblanchon/ArduinoJson?branch=6.x)
* Continuously tested on * Continuously tested on
* [Visual Studio 2010, 2012, 2013, 2015, 2017, 2019, 2022](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/6.x) * [Visual Studio 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) * [GCC 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) * [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) * [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

@ -1,4 +1,4 @@
version: 6.20.1.{build} version: 6.21.0.{build}
environment: environment:
matrix: matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
@ -7,15 +7,6 @@ environment:
CMAKE_GENERATOR: Visual Studio 16 2019 CMAKE_GENERATOR: Visual Studio 16 2019
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_GENERATOR: Visual Studio 15 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 - CMAKE_GENERATOR: Ninja
MINGW32: i686-6.3.0-posix-dwarf-rt_v5-rev1 # MinGW-w64 6.3.0 i686 MINGW32: i686-6.3.0-posix-dwarf-rt_v5-rev1 # MinGW-w64 6.3.0 i686
- CMAKE_GENERATOR: Ninja - CMAKE_GENERATOR: Ninja

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

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

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

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

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

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

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

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

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

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org // ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON // Copyright © 2014-2023, Benoit BLANCHON
// MIT License // MIT License
// //
// This example shows the different ways you can use String with ArduinoJson. // 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}) if(${COVERAGE})
set(CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage") set(CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage")
endif() endif()
endif() endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8) AND (NOT ${COVERAGE})) if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8) AND(NOT ${COVERAGE}))
add_compile_options(-g -Og) add_compile_options(-g -Og)
else() else()
add_compile_options(-g -O0) add_compile_options(-g -O0)
@ -65,7 +64,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif() endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") 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) add_compile_options(-g -Og)
else() else()
add_compile_options(-g -O0) add_compile_options(-g -O0)
@ -73,7 +72,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
endif() endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") 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) add_compile_options(-g -Og)
else() else()
add_compile_options(-g -O0) add_compile_options(-g -O0)
@ -85,13 +84,8 @@ if(MSVC)
add_compile_options( add_compile_options(
/W4 # Set warning level /W4 # Set warning level
/WX # Treats all compiler warnings as errors. /WX # Treats all compiler warnings as errors.
)
if (NOT MSVC_VERSION LESS 1910) # >= Visual Studio 2017
add_compile_options(
/Zc:__cplusplus # Enable updated __cplusplus macro /Zc:__cplusplus # Enable updated __cplusplus macro
) )
endif()
endif() endif()
if(MINGW) if(MINGW)

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

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

@ -1,5 +1,5 @@
// ArduinoJson - https://arduinojson.org // ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON // Copyright © 2014-2023, Benoit BLANCHON
// MIT License // MIT License
#include <ArduinoJson.h> #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(ARDUINOJSON_USE_DOUBLE == 1, "ARDUINOJSON_USE_DOUBLE");
static_assert(sizeof(ARDUINOJSON_NAMESPACE::VariantSlot) == 8, static_assert(sizeof(ArduinoJson::detail::VariantSlot) == 8,
"sizeof(VariantSlot)"); "sizeof(VariantSlot)");
void setup() {} 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(ARDUINOJSON_USE_DOUBLE == 1, "ARDUINOJSON_USE_DOUBLE");
static_assert(sizeof(ARDUINOJSON_NAMESPACE::VariantSlot) == 16, static_assert(sizeof(ArduinoJson::detail::VariantSlot) == 16,
"sizeof(VariantSlot)"); "sizeof(VariantSlot)");
void setup() {} 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(ARDUINOJSON_USE_DOUBLE == 1, "ARDUINOJSON_USE_DOUBLE");
static_assert(sizeof(ARDUINOJSON_NAMESPACE::VariantSlot) == 32, static_assert(sizeof(ArduinoJson::detail::VariantSlot) == 32,
"sizeof(VariantSlot)"); "sizeof(VariantSlot)");
int main() {} 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(ARDUINOJSON_USE_DOUBLE == 1, "ARDUINOJSON_USE_DOUBLE");
static_assert(sizeof(ARDUINOJSON_NAMESPACE::VariantSlot) == 16, static_assert(sizeof(ArduinoJson::detail::VariantSlot) == 16,
"sizeof(VariantSlot)"); "sizeof(VariantSlot)");
int main() {} int main() {}

@ -1,7 +1,10 @@
# ArduinoJson - https://arduinojson.org # ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON # Copyright © 2014-2023, Benoit BLANCHON
# MIT License # MIT License
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(MSVC) if(MSVC)
add_compile_options(-D_CRT_SECURE_NO_WARNINGS) add_compile_options(-D_CRT_SECURE_NO_WARNINGS)
endif() endif()
@ -34,17 +37,13 @@ macro(add_fuzzer name)
) )
set_target_properties("${FUZZER}" set_target_properties("${FUZZER}"
PROPERTIES PROPERTIES
COMPILE_FLAGS COMPILE_FLAGS "-fprofile-instr-generate -fcoverage-mapping -fsanitize=fuzzer -fno-sanitize-recover=all"
"-fprofile-instr-generate -fcoverage-mapping -fsanitize=fuzzer -fno-sanitize-recover=all" LINK_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( add_test(
NAME NAME "${FUZZER}"
"${FUZZER}" COMMAND "${FUZZER}" "${CORPUS_DIR}" "${SEED_CORPUS_DIR}" -max_total_time=5 -timeout=1
COMMAND
"${FUZZER}" "${CORPUS_DIR}" "${SEED_CORPUS_DIR}" -max_total_time=5 -timeout=1
) )
set_tests_properties("${FUZZER}" set_tests_properties("${FUZZER}"
@ -53,7 +52,7 @@ macro(add_fuzzer name)
) )
endmacro() 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(json)
add_fuzzer(msgpack) add_fuzzer(msgpack)
endif() endif()

@ -1,6 +1,6 @@
# CAUTION: this file is invoked by https://github.com/google/oss-fuzz # 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: \ all: \
$(OUT)/json_fuzzer \ $(OUT)/json_fuzzer \

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

@ -53,7 +53,8 @@ process()
} }
simplify_namespaces() { 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" rm -f "$1.bak"
} }

@ -51,7 +51,7 @@ update_version_in_source () {
} }
commit_new_version () { 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" git commit -m "Set version to $VERSION"
} }

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

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

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

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

@ -1,6 +1,6 @@
#include <ArduinoJson.h> #include <ArduinoJson.h>
#include <catch.hpp> #include <catch.hpp>
#include <string_view> #include <string_view>
#if !ARDUINOJSON_ENABLE_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") { TEST_CASE("StringViewAdapter") {
std::string_view str("bravoXXX", 5); std::string_view str("bravoXXX", 5);

@ -1,5 +1,5 @@
# ArduinoJson - https://arduinojson.org # ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON # Copyright © 2014-2023, Benoit BLANCHON
# MIT License # MIT License
if(MSVC_VERSION LESS 1910) if(MSVC_VERSION LESS 1910)

@ -1,5 +1,5 @@
# ArduinoJson - https://arduinojson.org # ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON # Copyright © 2014-2023, Benoit BLANCHON
# MIT License # MIT License
macro(build_should_fail target) macro(build_should_fail target)
@ -9,12 +9,9 @@ macro(build_should_fail target)
EXCLUDE_FROM_DEFAULT_BUILD TRUE EXCLUDE_FROM_DEFAULT_BUILD TRUE
) )
add_test( add_test(
NAME NAME ${target}
${target} COMMAND ${CMAKE_COMMAND} --build . --target ${target} --config $<CONFIGURATION>
COMMAND WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
${CMAKE_COMMAND} --build . --target ${target} --config $<CONFIGURATION>
WORKING_DIRECTORY
${CMAKE_BINARY_DIR}
) )
set_tests_properties(${target} set_tests_properties(${target}
PROPERTIES PROPERTIES
@ -23,7 +20,6 @@ macro(build_should_fail target)
) )
endmacro() endmacro()
add_executable(Issue978 Issue978.cpp) add_executable(Issue978 Issue978.cpp)
build_should_fail(Issue978) build_should_fail(Issue978)
@ -31,11 +27,9 @@ add_executable(Issue1189 Issue1189.cpp)
build_should_fail(Issue1189) build_should_fail(Issue1189)
add_executable(read_long_long read_long_long.cpp) 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) build_should_fail(read_long_long)
add_executable(write_long_long write_long_long.cpp) 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) build_should_fail(write_long_long)
add_executable(delete_jsondocument delete_jsondocument.cpp) add_executable(delete_jsondocument delete_jsondocument.cpp)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,5 +1,5 @@
# ArduinoJson - https://arduinojson.org # ArduinoJson - https://arduinojson.org
# Copyright © 2014-2022, Benoit BLANCHON # Copyright © 2014-2023, Benoit BLANCHON
# MIT License # MIT License
add_executable(JsonDocumentTests add_executable(JsonDocumentTests
@ -12,6 +12,7 @@ add_executable(JsonDocumentTests
DynamicJsonDocument.cpp DynamicJsonDocument.cpp
ElementProxy.cpp ElementProxy.cpp
isNull.cpp isNull.cpp
issue1120.cpp
MemberProxy.cpp MemberProxy.cpp
nesting.cpp nesting.cpp
overflowed.cpp overflowed.cpp

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save