Skip to content

Commit

Permalink
(:automated_merge:) Merge remote-tracking branch 'nlohmann-original/m…
Browse files Browse the repository at this point in the history
…aster'
  • Loading branch information
GerHobbelt committed May 20, 2024
2 parents b7bf8d0 + 9cca280 commit bc016c7
Show file tree
Hide file tree
Showing 159 changed files with 631 additions and 482 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ body:
label: Library version
description: >
Which version of the library did you use? If it is a released version,
please enter the version number (e.g., 3.11.2). Otherwise, please enter
please enter the version number (e.g., 3.11.3). Otherwise, please enter
the commit hash. If you got the library from another source as the
GitHub repository (e.g., via a package manager), please also state
this.
Expand Down
2 changes: 1 addition & 1 deletion .reuse/templates/json.jinja2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__ _____ _____ _____
__| | __| | | | JSON for Modern C++
| | |__ | | | | | | version 3.11.2
| | |__ | | | | | | version 3.11.3
|_____|_____|_____|_|___| https://github.com/nlohmann/json

{% for copyright_line in copyright_lines %}
Expand Down
2 changes: 1 addition & 1 deletion .reuse/templates/json_support.jinja2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (supporting code)
| | |__ | | | | | | version 3.11.2
| | |__ | | | | | | version 3.11.3
|_____|_____|_____|_|___| https://github.com/nlohmann/json

{% for copyright_line in copyright_lines %}
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ authors:
email: mail@nlohmann.me
website: https://nlohmann.me
title: "JSON for Modern C++"
version: 3.11.2
date-released: 2022-08-12
version: 3.11.3
date-released: 2023-11-28
license: MIT
repository-code: "https://github.com/nlohmann"
url: https://json.nlohmann.me
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1...3.14)
## PROJECT
## name and version
##
project(nlohmann_json VERSION 3.11.2 LANGUAGES CXX)
project(nlohmann_json VERSION 3.11.3 LANGUAGES CXX)

##
## MAIN_PROJECT CHECK
Expand Down
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ Example:
```cmake
include(FetchContent)
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz)
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz)
FetchContent_MakeAvailable(json)
target_link_libraries(foo PRIVATE nlohmann_json::nlohmann_json)
Expand Down Expand Up @@ -1733,6 +1733,36 @@ I deeply appreciate the help of the following people.
314. [Berkus Decker](https://github.com/berkus) fixed a typo in the README.
315. [Illia Polishchuk](https://github.com/effolkronium) improved the CMake testing.
316. [Ikko Ashimine](https://github.com/eltociear) fixed a typo.
317. [Raphael Grimm](https://github.com/barcode) added the possibility to define a custom base class.
318. [tocic](https://github.com/tocic) fixed typos in the documentation.
319. [Vertexwahn](https://github.com/Vertexwahn) added Bazel build support.
320. [Dirk Stolle](https://github.com/striezel) fixed typos in the documentation.
321. [DavidKorczynski](https://github.com/DavidKorczynski) added a CIFuzz CI GitHub action.
322. [Finkman](https://github.com/Finkman) fixed the debug pretty-printer.
323. [Florian Segginger](https://github.com/floriansegginger) bumped the years in the README.
324. [haadfida](https://github.com/haadfida) cleaned up the badges of used services.
325. [Arsen Arsenović](https://github.com/ArsenArsen) fixed a build error.
326. [theevilone45](https://github.com/theevilone45) fixed a typo in a CMake file.
327. [Sergei Trofimovich](https://github.com/trofi) fixed the custom allocator support.
328. [Joyce](https://github.com/joycebrum) fixed some security issues in the GitHub workflows.
329. [Nicolas Jakob](https://github.com/njakob) add vcpkg version badge.
330. [Tomerkm](https://github.com/Tomerkm) added tests.
331. [No.](https://github.com/tusooa) fixed the use of `get<>` calls.
332. [taro](https://github.com/tarolling) fixed a typo in the `CODEOWNERS` file.
333. [Ikko Eltociear Ashimine](https://github.com/eltociear) fixed a typo.
334. [Felix Yan](https://github.com/felixonmars) fixed a typo in the README.
335. [HO-COOH](https://github.com/HO-COOH) fixed a parentheses in the documentation.
336. [Ivor Wanders](https://github.com/iwanders) fixed the examples to catch exception by `const&`.
337. [miny1233](https://github.com/miny1233) fixed a parentheses in the documentation.
338. [tomalakgeretkal](https://github.com/tomalakgeretkal) fixed a compilation error.
339. [alferov](https://github.com/ALF-ONE) fixed a compilation error.
340. [Craig Scott](https://github.com/craigscott-crascit) fixed a deprecation warning in CMake.
341. [Vyacheslav Zhdanovskiy](https://github.com/ZeronSix) added macros for serialization-only types.
342. [Mathieu Westphal](https://github.com/mwestphal) fixed typos.
343. [scribam](https://github.com/scribam) fixed the MinGW workflow.
344. [Aleksei Sapitskii](https://github.com/aleksproger) added support for Apple's Swift Package Manager.
345. [Benjamin Buch](https://github.com/bebuch) fixed the installation path in CMake.
346. [Colby Haskell](https://github.com/colbychaskell) clarified the parse error message in case a file cannot be opened.

Thanks a lot for helping out! Please [let me know](mailto:mail@nlohmann.me) if I forgot someone.

Expand Down
Binary file modified docs/avatars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/docset/docset.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "JSON for Modern C++",
"version": "3.11.2",
"version": "3.11.3",
"archive": "JSON_for_Modern_C++.tgz",
"author": {
"name": "Niels Lohmann",
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/meta.output
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compiler": {
"c++": "201103",
"family": "gcc",
"version": "12.1.0"
"version": "12.3.0"
},
"copyright": "(C) 2013-2022 Niels Lohmann",
"name": "JSON for Modern C++",
Expand All @@ -11,7 +11,7 @@
"version": {
"major": 3,
"minor": 11,
"patch": 2,
"string": "3.11.2"
"patch": 3,
"string": "3.11.3"
}
}
2 changes: 1 addition & 1 deletion docs/examples/nlohmann_json_namespace.output
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nlohmann::json_abi_v3_11_2
nlohmann::json_abi_v3_11_3
2 changes: 1 addition & 1 deletion docs/examples/nlohmann_json_version.output
Original file line number Diff line number Diff line change
@@ -1 +1 @@
JSON for Modern C++ version 3.11.2
JSON for Modern C++ version 3.11.3
Binary file modified docs/json.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/mkdocs/docs/integration/cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ and use the namespaced imported target from the generated package configuration:
cmake_minimum_required(VERSION 3.1)
project(ExampleProject LANGUAGES CXX)

find_package(nlohmann_json 3.11.2 REQUIRED)
find_package(nlohmann_json 3.11.3 REQUIRED)

add_executable(example example.cpp)
target_link_libraries(example PRIVATE nlohmann_json::nlohmann_json)
Expand Down Expand Up @@ -77,7 +77,7 @@ to the following.

```cmake title="thirdparty/CMakeLists.txt"
if(EXAMPLE_USE_EXTERNAL_JSON)
find_package(nlohmann_json 3.11.2 REQUIRED)
find_package(nlohmann_json 3.11.3 REQUIRED)
else()
set(JSON_BuildTests OFF CACHE INTERNAL "")
add_subdirectory(nlohmann_json)
Expand All @@ -100,7 +100,7 @@ automatically download a release as a dependency at configure type.

include(FetchContent)

FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz)
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz)
FetchContent_MakeAvailable(json)

add_executable(example example.cpp)
Expand All @@ -115,7 +115,7 @@ automatically download a release as a dependency at configure type.
```cmake
FetchContent_Declare(json
GIT_REPOSITORY https://github.com/nlohmann/json
GIT_TAG v3.11.2
GIT_TAG v3.11.3
)
```

Expand Down
4 changes: 2 additions & 2 deletions include/nlohmann/adl_serializer.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
// | | |__ | | | | | | version 3.11.2
// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT

#pragma once
Expand Down
4 changes: 2 additions & 2 deletions include/nlohmann/byte_container_with_subtype.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
// | | |__ | | | | | | version 3.11.2
// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT

#pragma once
Expand Down
8 changes: 4 additions & 4 deletions include/nlohmann/detail/abi_macros.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
// | | |__ | | | | | | version 3.11.2
// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT

#pragma once
Expand All @@ -12,15 +12,15 @@

#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK
#if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH)
#if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 2
#if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 3
#warning "Already included a different version of the library!"
#endif
#endif
#endif

#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum)
#define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum)
#define NLOHMANN_JSON_VERSION_PATCH 2 // NOLINT(modernize-macro-to-enum)
#define NLOHMANN_JSON_VERSION_PATCH 3 // NOLINT(modernize-macro-to-enum)

#ifndef JSON_DIAGNOSTICS
#define JSON_DIAGNOSTICS 0
Expand Down
4 changes: 2 additions & 2 deletions include/nlohmann/detail/conversions/from_json.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
// | | |__ | | | | | | version 3.11.2
// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT

#pragma once
Expand Down
4 changes: 2 additions & 2 deletions include/nlohmann/detail/conversions/to_chars.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
// | | |__ | | | | | | version 3.11.2
// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2009 Florian Loitsch <https://florian.loitsch.com/>
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT

#pragma once
Expand Down
4 changes: 2 additions & 2 deletions include/nlohmann/detail/conversions/to_json.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
// | | |__ | | | | | | version 3.11.2
// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT

#pragma once
Expand Down
4 changes: 2 additions & 2 deletions include/nlohmann/detail/exceptions.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
// | | |__ | | | | | | version 3.11.2
// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT

#pragma once
Expand Down
4 changes: 2 additions & 2 deletions include/nlohmann/detail/hash.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
// | | |__ | | | | | | version 3.11.2
// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT

#pragma once
Expand Down
22 changes: 11 additions & 11 deletions include/nlohmann/detail/input/binary_reader.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
// | | |__ | | | | | | version 3.11.2
// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT

#pragma once
Expand Down Expand Up @@ -72,7 +72,7 @@ class binary_reader
using binary_t = typename BasicJsonType::binary_t;
using json_sax_t = SAX;
using char_type = typename InputAdapterType::char_type;
using char_int_type = typename std::char_traits<char_type>::int_type;
using char_int_type = typename char_traits<char_type>::int_type;

public:
/*!
Expand Down Expand Up @@ -145,7 +145,7 @@ class binary_reader
get();
}

if (JSON_HEDLEY_UNLIKELY(current != std::char_traits<char_type>::eof()))
if (JSON_HEDLEY_UNLIKELY(current != char_traits<char_type>::eof()))
{
return sax->parse_error(chars_read, get_token_string(), parse_error::create(110, chars_read,
exception_message(input_format, concat("expected end of input; last byte: 0x", get_token_string()), "value"), nullptr));
Expand Down Expand Up @@ -228,7 +228,7 @@ class binary_reader
exception_message(input_format_t::bson, concat("string length must be at least 1, is ", std::to_string(len)), "string"), nullptr));
}

return get_string(input_format_t::bson, len - static_cast<NumberType>(1), result) && get() != std::char_traits<char_type>::eof();
return get_string(input_format_t::bson, len - static_cast<NumberType>(1), result) && get() != char_traits<char_type>::eof();
}

/*!
Expand Down Expand Up @@ -422,7 +422,7 @@ class binary_reader
switch (get_char ? get() : current)
{
// EOF
case std::char_traits<char_type>::eof():
case char_traits<char_type>::eof():
return unexpect_eof(input_format_t::cbor, "value");

// Integer 0x00..0x17 (0..23)
Expand Down Expand Up @@ -1197,7 +1197,7 @@ class binary_reader
switch (get())
{
// EOF
case std::char_traits<char_type>::eof():
case char_traits<char_type>::eof():
return unexpect_eof(input_format_t::msgpack, "value");

// positive fixint
Expand Down Expand Up @@ -2299,7 +2299,7 @@ class binary_reader
{
switch (prefix)
{
case std::char_traits<char_type>::eof(): // EOF
case char_traits<char_type>::eof(): // EOF
return unexpect_eof(input_format, "value");

case 'T': // true
Expand Down Expand Up @@ -2744,7 +2744,7 @@ class binary_reader
This function provides the interface to the used input adapter. It does
not throw in case the input reached EOF, but returns a -'ve valued
`std::char_traits<char_type>::eof()` in that case.
`char_traits<char_type>::eof()` in that case.
@return character read from the input
*/
Expand Down Expand Up @@ -2886,7 +2886,7 @@ class binary_reader
JSON_HEDLEY_NON_NULL(3)
bool unexpect_eof(const input_format_t format, const char* context) const
{
if (JSON_HEDLEY_UNLIKELY(current == std::char_traits<char_type>::eof()))
if (JSON_HEDLEY_UNLIKELY(current == char_traits<char_type>::eof()))
{
return sax->parse_error(chars_read, "<end of file>",
parse_error::create(110, chars_read, exception_message(format, "unexpected end of input", context), nullptr));
Expand Down Expand Up @@ -2953,7 +2953,7 @@ class binary_reader
InputAdapterType ia;

/// the current character
char_int_type current = std::char_traits<char_type>::eof();
char_int_type current = char_traits<char_type>::eof();

/// the number of characters read
std::size_t chars_read = 0;
Expand Down
Loading

0 comments on commit bc016c7

Please sign in to comment.