-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'nlohmann:develop' into patch-1
- Loading branch information
Showing
158 changed files
with
1,065 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,9 +33,11 @@ jobs: | |
|
||
ci_test_gcc: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/nlohmann/json-ci:v2.4.0 | ||
container: gcc:latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Get latest CMake and ninja | ||
uses: lukka/[email protected] | ||
- name: Run CMake | ||
run: cmake -S . -B build -DJSON_CI=On | ||
- name: Build | ||
|
@@ -46,14 +48,32 @@ jobs: | |
container: ghcr.io/nlohmann/json-ci:v2.4.0 | ||
strategy: | ||
matrix: | ||
target: [ci_cppcheck, ci_test_valgrind, ci_test_amalgamation, ci_test_single_header, ci_single_binaries, ci_infer] | ||
target: [ | ||
ci_cppcheck, # needs cppcheck | ||
ci_test_valgrind, # needs Valgrind | ||
ci_test_amalgamation, # needs AStyle | ||
ci_infer, # needs Infer | ||
ci_single_binaries # needs iwyu | ||
] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run CMake | ||
run: cmake -S . -B build -DJSON_CI=On | ||
- name: Build | ||
run: cmake --build build --target ${{ matrix.target }} | ||
|
||
ci_test_single_header: | ||
runs-on: ubuntu-latest | ||
container: gcc:latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Get latest CMake and ninja | ||
uses: lukka/[email protected] | ||
- name: Run CMake | ||
run: cmake -S . -B build -DJSON_CI=On | ||
- name: Build | ||
run: cmake --build build --target ci_test_single_header | ||
|
||
ci_static_analysis_ubuntu: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
@@ -104,23 +124,29 @@ jobs: | |
|
||
ci_test_coverage: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/nlohmann/json-ci:v2.4.0 | ||
permissions: | ||
contents: read | ||
checks: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies and de_DE locale | ||
run: | | ||
sudo apt-get clean | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential cmake lcov ninja-build make locales gcc-multilib g++-multilib | ||
sudo locale-gen de_DE | ||
sudo update-locale | ||
- name: Run CMake | ||
run: cmake -S . -B build -DJSON_CI=On | ||
- name: Build | ||
run: cmake --build build --target ci_test_coverage | ||
- name: Archive coverage report | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: code-coverage-report | ||
path: ${{ github.workspace }}/build/html | ||
- name: Publish report to Coveralls | ||
uses: coverallsapp/github-action@master | ||
uses: coverallsapp/github-action@v2.3.4 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ${{ github.workspace }}/build/json.info.filtered.noexcept | ||
|
@@ -174,27 +200,16 @@ jobs: | |
- name: Build | ||
run: cmake --build build --target ci_test_compiler_default | ||
|
||
ci_test_compilers: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/nlohmann/json-ci:v2.4.0 | ||
strategy: | ||
matrix: | ||
compiler: [g++-4.8] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run CMake | ||
run: cmake -S . -B build -DJSON_CI=On | ||
- name: Build | ||
run: cmake --build build --target ci_test_compiler_${{ matrix.compiler }} | ||
|
||
ci_test_standards_gcc: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/nlohmann/json-ci:v2.4.0 | ||
container: gcc:latest | ||
strategy: | ||
matrix: | ||
standard: [11, 14, 17, 20, 23] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Get latest CMake and ninja | ||
uses: lukka/[email protected] | ||
- name: Run CMake | ||
run: cmake -S . -B build -DJSON_CI=On | ||
- name: Build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,13 @@ Upstream-Contact: Niels Lohmann <[email protected]> | |
Source: https://github.com/nlohmann/json | ||
|
||
Files: * | ||
Copyright: 2013-2022 Niels Lohmann <https://nlohmann.me> | ||
Copyright: 2013-2024 Niels Lohmann <https://nlohmann.me> | ||
License: MIT | ||
|
||
Files: include/nlohmann/thirdparty/hedley.hpp | ||
Copyright: 2016-2021 Evan Nemerson <[email protected]> | ||
License: CC0 | ||
|
||
Files: tests/thirdparty/doctest/* | ||
Copyright: 2016-2021 Viktor Kirilov | ||
License: MIT | ||
|
@@ -16,7 +20,7 @@ Copyright: 2015-2017 Niels Lohmann | |
License: MIT | ||
|
||
Files: tests/thirdparty/Fuzzer/* | ||
Copyright: 2003-2022, LLVM Project. | ||
Copyright: 2003-2022 LLVM Project. | ||
License: Apache-2.0 | ||
|
||
Files: tests/thirdparty/imapdl/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ | |
- [Notes](#notes) | ||
- [Execute unit tests](#execute-unit-tests) | ||
|
||
|
||
## Design goals | ||
|
||
There are myriads of [JSON](https://json.org) libraries out there, and each may even have its reason to exist. Our class had these design goals: | ||
|
@@ -78,6 +79,7 @@ You can sponsor this library at [GitHub Sponsors](https://github.com/sponsors/nl | |
### :raising_hand: Priority Sponsor | ||
|
||
- [Martti Laine](https://github.com/codeclown) | ||
- [Paul Harrington](https://github.com/phrrngtn) | ||
|
||
### :label: Named Sponsors | ||
|
||
|
@@ -90,6 +92,7 @@ You can sponsor this library at [GitHub Sponsors](https://github.com/sponsors/nl | |
|
||
Thanks everyone! | ||
|
||
|
||
## Support | ||
|
||
:question: If you have a **question**, please check if it is already answered in the [**FAQ**](https://json.nlohmann.me/home/faq/) or the [**Q&A**](https://github.com/nlohmann/json/discussions/categories/q-a) section. If not, please [**ask a new question**](https://github.com/nlohmann/json/discussions/new) there. | ||
|
@@ -102,6 +105,7 @@ Thanks everyone! | |
|
||
There is also a [**docset**](https://github.com/Kapeli/Dash-User-Contributions/tree/master/docsets/JSON_for_Modern_C%2B%2B) for the documentation browsers [Dash](https://kapeli.com/dash), [Velocity](https://velocity.silverlakesoftware.com), and [Zeal](https://zealdocs.org) that contains the full [documentation](https://json.nlohmann.me) as offline resource. | ||
|
||
|
||
## Examples | ||
|
||
Here are some examples to give you an idea how to use the class. | ||
|
@@ -1115,7 +1119,7 @@ Though it's 2024 already, the support for C++11 is still a bit sparse. Currently | |
- GCC 4.8 - 14.2 (and possibly later) | ||
- Clang 3.4 - 20.0 (and possibly later) | ||
- Apple Clang 9.1 - 16.0 (and possibly later) | ||
- Apple Clang 9.1 - 16.1 (and possibly later) | ||
- Intel C++ Compiler 17.0.2 (and possibly later) | ||
- Nvidia CUDA Compiler 11.0.221 (and possibly later) | ||
- Microsoft Visual C++ 2015 / Build Tools 14.0.25123.0 (and possibly later) | ||
|
@@ -1146,13 +1150,7 @@ The following compilers are currently used in continuous integration at [AppVeyo | |
| Compiler | Operating System | CI Provider | | ||
|--------------------------------------------------------------------------------------------------------|--------------------|----------------| | ||
| Apple Clang 13.0.0 (clang-1300.0.29.3); Xcode 13.1 | macOS 12.7.6 | GitHub Actions | | ||
| Apple Clang 13.0.0 (clang-1300.0.29.30); Xcode 13.2.1 | macOS 12.7.6 | GitHub Actions | | ||
| Apple Clang 13.1.6 (clang-1316.0.21.2.3); Xcode 13.3.1 | macOS 12.7.6 | GitHub Actions | | ||
| Apple Clang 13.1.6 (clang-1316.0.21.2.5); Xcode 13.4.1 | macOS 12.7.6 | GitHub Actions | | ||
| Apple Clang 14.0.0 (clang-1400.0.29.102); Xcode 14.0 | macOS 12.7.6 | GitHub Actions | | ||
| Apple Clang 14.0.0 (clang-1400.0.29.102); Xcode 14.0.1 | macOS 12.7.6 | GitHub Actions | | ||
| Apple Clang 14.0.0 (clang-1400.0.29.202); Xcode 14.1 | macOS 12.7.6 | GitHub Actions | | ||
| Apple Clang 14.0.0 (clang-1400.0.29.202); Xcode 14.1 | macOS 13.7 | GitHub Actions | | ||
| Apple Clang 14.0.0 (clang-1400.0.29.202); Xcode 14.2 | macOS 13.7 | GitHub Actions | | ||
| Apple Clang 14.0.3 (clang-1403.0.22.14.1); Xcode 14.3 | macOS 13.7 | GitHub Actions | | ||
| Apple Clang 14.0.3 (clang-1403.0.22.14.1); Xcode 14.3.1 | macOS 13.7.1 | GitHub Actions | | ||
|
@@ -1393,11 +1391,11 @@ json = dependency('nlohmann_json', required: true) | |
|
||
## License | ||
|
||
<img align="right" src="https://opensource.org/trademarks/opensource/OSI-Approved-License-100x137.png"> | ||
<img align="right" src="https://149753425.v2.pressablecdn.com/wp-content/uploads/2009/06/OSIApproved_100X125.png" alt="OSI approved license"> | ||
|
||
The class is licensed under the [MIT License](https://opensource.org/licenses/MIT): | ||
|
||
Copyright © 2013-2022 [Niels Lohmann](https://nlohmann.me) | ||
Copyright © 2013-2024 [Niels Lohmann](https://nlohmann.me) | ||
|
||
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: | ||
|
||
|
@@ -1407,13 +1405,19 @@ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR I | |
|
||
* * * | ||
|
||
The class contains the UTF-8 Decoder from Bjoern Hoehrmann which is licensed under the [MIT License](https://opensource.org/licenses/MIT) (see above). Copyright © 2008-2009 [Björn Hoehrmann](https://bjoern.hoehrmann.de/) <[email protected]> | ||
- The class contains the UTF-8 Decoder from Bjoern Hoehrmann which is licensed under the [MIT License](https://opensource.org/licenses/MIT) (see above). Copyright © 2008-2009 [Björn Hoehrmann](https://bjoern.hoehrmann.de/) <[email protected]> | ||
- The class contains a slightly modified version of the Grisu2 algorithm from Florian Loitsch which is licensed under the [MIT License](https://opensource.org/licenses/MIT) (see above). Copyright © 2009 [Florian Loitsch](https://florian.loitsch.com/) | ||
- The class contains a copy of [Hedley](https://nemequ.github.io/hedley/) from Evan Nemerson which is licensed as [CC0-1.0](https://creativecommons.org/publicdomain/zero/1.0/). | ||
- The class contains parts of [Google Abseil](https://github.com/abseil/abseil-cpp) which is licensed under the [Apache 2.0 License](https://opensource.org/licenses/Apache-2.0). | ||
|
||
The class contains a slightly modified version of the Grisu2 algorithm from Florian Loitsch which is licensed under the [MIT License](https://opensource.org/licenses/MIT) (see above). Copyright © 2009 [Florian Loitsch](https://florian.loitsch.com/) | ||
<img align="right" src="https://git.fsfe.org/reuse/reuse-ci/raw/branch/master/reuse-horizontal.png" alt="REUSE Software"> | ||
|
||
The class contains a copy of [Hedley](https://nemequ.github.io/hedley/) from Evan Nemerson which is licensed as [CC0-1.0](https://creativecommons.org/publicdomain/zero/1.0/). | ||
The library is compliant to version 3.3 of the [**REUSE specification**](https://reuse.software): | ||
|
||
The class contains parts of [Google Abseil](https://github.com/abseil/abseil-cpp) which is licensed under the [Apache 2.0 License](https://opensource.org/licenses/Apache-2.0). | ||
- Every source file contains an SPDX copyright header. | ||
- The full text of all licenses used in the repository can be found in the `LICENSES` folder. | ||
- File `.reuse/dep5` contains an overview of all files' copyrights and licenses. | ||
- Run `pipx run reuse lint` to verify the project's REUSE compliance and `pipx run reuse spdx` to generate a SPDX SBOM. | ||
|
||
## Contact | ||
|
||
|
Oops, something went wrong.