Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55f93686c0 | ||
|
|
34e46d76da |
No files matched your search
+17
@@ -0,0 +1,17 @@
|
|||||||
|
arm_container:
|
||||||
|
image: gcc:latest
|
||||||
|
|
||||||
|
check_task:
|
||||||
|
check_script:
|
||||||
|
- wget https://github.com/Kitware/CMake/releases/download/v3.20.2/cmake-3.20.2.tar.gz
|
||||||
|
- tar xfz cmake-3.20.2.tar.gz
|
||||||
|
- cd cmake-3.20.2
|
||||||
|
- ./configure
|
||||||
|
- make cmake ctest -j4
|
||||||
|
- cd ..
|
||||||
|
- mkdir build
|
||||||
|
- cd build
|
||||||
|
- ../cmake-3.20.2/bin/cmake .. -DJSON_FastTests=ON
|
||||||
|
- make -j4
|
||||||
|
- cd tests
|
||||||
|
- ../../cmake-3.20.2/bin/ctest -j4
|
||||||
+15
-52
@@ -1,80 +1,52 @@
|
|||||||
# Style or vendor rule sets that do not fit a header-only library:
|
# TODO: The first three checks are only removed to get the CI going. They have to be addressed at some point.
|
||||||
# altera-*, fuchsia-*, llvmlibc-*, android-cloexec-fopen, boost-use-ranges, llvm-header-guard,
|
|
||||||
# llvm-include-order, llvm-prefer-static-over-anonymous-namespace, llvm-use-ranges,
|
|
||||||
# misc-use-anonymous-namespace, google-runtime-float, google-runtime-int, hicpp-signed-bitwise,
|
|
||||||
# bugprone-signed-bitwise, hicpp-explicit-conversions, google-explicit-constructor,
|
|
||||||
# cppcoreguidelines-explicit-constructor, misc-explicit-constructor (implicit conversions are the
|
|
||||||
# API), readability-trailing-comma,
|
|
||||||
# hicpp-avoid-goto / cppcoreguidelines-avoid-goto, hicpp-no-array-decay,
|
|
||||||
# hicpp-uppercase-literal-suffix, readability-uppercase-literal-suffix, modernize-use-trailing-return-type.
|
|
||||||
# Constructs the library needs on purpose (the library supports C++11 and legacy compilers):
|
|
||||||
# cppcoreguidelines-macro-usage, cppcoreguidelines-avoid-do-while (macros),
|
|
||||||
# cppcoreguidelines-pro-bounds-*, cppcoreguidelines-pro-type-reinterpret-cast,
|
|
||||||
# cppcoreguidelines-pro-type-union-access (parsers, serializers, basic_json's value union),
|
|
||||||
# cppcoreguidelines-avoid-const-or-ref-data-members, cppcoreguidelines-rvalue-reference-param-not-moved,
|
|
||||||
# cppcoreguidelines-avoid-non-const-global-variables, misc-non-private-member-variables-in-classes,
|
|
||||||
# misc-no-recursion (value walks are recursive, bounded by detail::recursion_depth_limit()),
|
|
||||||
# modernize-type-traits, modernize-use-constraints, modernize-use-ranges, modernize-use-std-numbers,
|
|
||||||
# modernize-use-designated-initializers, modernize-use-nodiscard, modernize-concat-nested-namespaces,
|
|
||||||
# readability-redundant-typename, readability-redundant-parentheses,
|
|
||||||
# readability-redundant-access-specifiers, readability-simplify-boolean-expr,
|
|
||||||
# readability-use-concise-preprocessor-directives, modernize-use-string-view,
|
|
||||||
# modernize-use-integer-sign-comparison (needs std::cmp_less; the flagged
|
|
||||||
# static_cast<std::size_t>(end - pos) < n comparisons are deliberate)
|
|
||||||
# (all need a newer standard or compiler than C++11, or would change macro-generated or
|
|
||||||
# deliberately explicit code).
|
|
||||||
# Too noisy to be useful (numeric parsing/formatting code, doctest, tests):
|
|
||||||
# bugprone-easily-swappable-parameters, cppcoreguidelines-avoid-magic-numbers, readability-magic-numbers,
|
|
||||||
# readability-identifier-length, readability-function-cognitive-complexity, performance-enum-size,
|
|
||||||
# concurrency-mt-unsafe, misc-confusable-identifiers, misc-include-cleaner (run on its own for
|
|
||||||
# the consumer headers in cmake/ci.cmake).
|
|
||||||
# portability-avoid-pragma-once: kept disabled on purpose. #pragma once is accepted
|
|
||||||
# by every supported compiler, and tools/amalgamate/amalgamate.py strips it from
|
|
||||||
# single_include, so there is nothing left to fix here.
|
|
||||||
|
|
||||||
Checks: '*,
|
Checks: '*,
|
||||||
|
|
||||||
|
-portability-template-virtual-member-function,
|
||||||
|
-bugprone-use-after-move,
|
||||||
|
-hicpp-invalid-access-moved,
|
||||||
|
|
||||||
-altera-id-dependent-backward-branch,
|
-altera-id-dependent-backward-branch,
|
||||||
-altera-struct-pack-align,
|
-altera-struct-pack-align,
|
||||||
-altera-unroll-loops,
|
-altera-unroll-loops,
|
||||||
-android-cloexec-fopen,
|
-android-cloexec-fopen,
|
||||||
-boost-use-ranges,
|
-boost-use-ranges,
|
||||||
-bugprone-easily-swappable-parameters,
|
-bugprone-easily-swappable-parameters,
|
||||||
-bugprone-signed-bitwise,
|
-cert-err58-cpp,
|
||||||
|
-clang-analyzer-webkit.NoUncountedMemberChecker,
|
||||||
-concurrency-mt-unsafe,
|
-concurrency-mt-unsafe,
|
||||||
-cppcoreguidelines-avoid-const-or-ref-data-members,
|
-cppcoreguidelines-avoid-const-or-ref-data-members,
|
||||||
-cppcoreguidelines-avoid-do-while,
|
-cppcoreguidelines-avoid-do-while,
|
||||||
-cppcoreguidelines-avoid-goto,
|
-cppcoreguidelines-avoid-goto,
|
||||||
-cppcoreguidelines-avoid-magic-numbers,
|
-cppcoreguidelines-avoid-magic-numbers,
|
||||||
-cppcoreguidelines-avoid-non-const-global-variables,
|
-cppcoreguidelines-avoid-non-const-global-variables,
|
||||||
-cppcoreguidelines-explicit-constructor,
|
|
||||||
-cppcoreguidelines-macro-usage,
|
-cppcoreguidelines-macro-usage,
|
||||||
-cppcoreguidelines-pro-bounds-avoid-unchecked-container-access,
|
|
||||||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
||||||
-cppcoreguidelines-pro-bounds-constant-array-index,
|
-cppcoreguidelines-pro-bounds-constant-array-index,
|
||||||
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
||||||
-cppcoreguidelines-pro-type-reinterpret-cast,
|
-cppcoreguidelines-pro-type-reinterpret-cast,
|
||||||
-cppcoreguidelines-pro-type-union-access,
|
-cppcoreguidelines-pro-type-union-access,
|
||||||
-cppcoreguidelines-rvalue-reference-param-not-moved,
|
-cppcoreguidelines-rvalue-reference-param-not-moved,
|
||||||
|
-cppcoreguidelines-virtual-class-destructor,
|
||||||
-fuchsia-default-arguments-calls,
|
-fuchsia-default-arguments-calls,
|
||||||
-fuchsia-default-arguments-declarations,
|
-fuchsia-default-arguments-declarations,
|
||||||
-fuchsia-overloaded-operator,
|
-fuchsia-overloaded-operator,
|
||||||
-google-explicit-constructor,
|
-google-explicit-constructor,
|
||||||
-google-runtime-float,
|
-google-readability-function-size,
|
||||||
-google-runtime-int,
|
-google-runtime-int,
|
||||||
|
-google-runtime-references,
|
||||||
-hicpp-avoid-goto,
|
-hicpp-avoid-goto,
|
||||||
-hicpp-explicit-conversions,
|
-hicpp-explicit-conversions,
|
||||||
|
-hicpp-function-size,
|
||||||
-hicpp-no-array-decay,
|
-hicpp-no-array-decay,
|
||||||
|
-hicpp-no-assembler,
|
||||||
-hicpp-signed-bitwise,
|
-hicpp-signed-bitwise,
|
||||||
-hicpp-uppercase-literal-suffix,
|
-hicpp-uppercase-literal-suffix,
|
||||||
-llvm-header-guard,
|
-llvm-header-guard,
|
||||||
-llvm-include-order,
|
-llvm-include-order,
|
||||||
-llvm-prefer-static-over-anonymous-namespace,
|
|
||||||
-llvm-use-ranges,
|
|
||||||
-llvmlibc-*,
|
-llvmlibc-*,
|
||||||
-misc-use-anonymous-namespace,
|
-misc-use-anonymous-namespace,
|
||||||
-misc-confusable-identifiers,
|
-misc-confusable-identifiers,
|
||||||
-misc-explicit-constructor,
|
|
||||||
-misc-include-cleaner,
|
-misc-include-cleaner,
|
||||||
-misc-no-recursion,
|
-misc-no-recursion,
|
||||||
-misc-non-private-member-variables-in-classes,
|
-misc-non-private-member-variables-in-classes,
|
||||||
@@ -82,33 +54,24 @@ Checks: '*,
|
|||||||
-modernize-type-traits,
|
-modernize-type-traits,
|
||||||
-modernize-use-constraints,
|
-modernize-use-constraints,
|
||||||
-modernize-use-designated-initializers,
|
-modernize-use-designated-initializers,
|
||||||
-modernize-use-integer-sign-comparison,
|
|
||||||
-modernize-use-nodiscard,
|
-modernize-use-nodiscard,
|
||||||
-modernize-use-ranges,
|
-modernize-use-ranges,
|
||||||
-modernize-use-string-view,
|
|
||||||
-modernize-use-std-numbers,
|
-modernize-use-std-numbers,
|
||||||
-modernize-use-trailing-return-type,
|
-modernize-use-trailing-return-type,
|
||||||
-performance-enum-size,
|
-performance-enum-size,
|
||||||
-portability-avoid-pragma-once,
|
|
||||||
-readability-function-cognitive-complexity,
|
-readability-function-cognitive-complexity,
|
||||||
|
-readability-function-size,
|
||||||
-readability-identifier-length,
|
-readability-identifier-length,
|
||||||
-readability-magic-numbers,
|
-readability-magic-numbers,
|
||||||
-readability-redundant-access-specifiers,
|
-readability-redundant-access-specifiers,
|
||||||
-readability-redundant-parentheses,
|
|
||||||
-readability-redundant-typename,
|
|
||||||
-readability-simplify-boolean-expr,
|
-readability-simplify-boolean-expr,
|
||||||
-readability-trailing-comma,
|
-readability-uppercase-literal-suffix'
|
||||||
-readability-uppercase-literal-suffix,
|
|
||||||
-readability-use-concise-preprocessor-directives'
|
|
||||||
|
|
||||||
CheckOptions:
|
CheckOptions:
|
||||||
- key: hicpp-special-member-functions.AllowSoleDefaultDtor
|
- key: hicpp-special-member-functions.AllowSoleDefaultDtor
|
||||||
value: 1
|
value: 1
|
||||||
# clang-tidy 22.1 extended this check to classes and enums; the test files
|
|
||||||
# define many such helper types at namespace scope, which is harmless
|
|
||||||
- key: misc-use-internal-linkage.AnalyzeTypes
|
|
||||||
value: false
|
|
||||||
|
|
||||||
WarningsAsErrors: '*'
|
WarningsAsErrors: '*'
|
||||||
|
|
||||||
|
#HeaderFilterRegex: '.*nlohmann.*'
|
||||||
HeaderFilterRegex: '.*hpp$'
|
HeaderFilterRegex: '.*hpp$'
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# generated files are collapsed in diffs and excluded from language statistics
|
|
||||||
single_include/** linguist-generated
|
|
||||||
nlohmann_json.natvis linguist-generated
|
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
# JSON for Modern C++ was originally written by Niels Lohmann.
|
# JSON for Modern C++ was originally written by Niels Lohmann.
|
||||||
# Since 2013, over 400 contributors have helped to improve the library.
|
# Since 2013, over 250 contributors have helped to improve the library.
|
||||||
# This CODEOWNERS file is only to make sure that @nlohmann is requested
|
# This CODEOWNERS file is only to make sure that @nlohmann is requested
|
||||||
# for a code review in case of a pull request.
|
# for a code review in case of a pull request.
|
||||||
|
|
||||||
|
|||||||
+25
-54
@@ -1,7 +1,7 @@
|
|||||||
# Contribution Guidelines
|
# Contribution Guidelines
|
||||||
|
|
||||||
Thank you for your interest in contributing to this project! What began as an exercise to explore the exciting features
|
Thank you for your interest in contributing to this project! What began as an exercise to explore the exciting features
|
||||||
of C++11 has evolved into a [widely used](https://json.nlohmann.me/home/customers/) JSON library. I truly appreciate all
|
of C++11 has evolved into a [widely-used](https://json.nlohmann.me/home/customers/) JSON library. I truly appreciate all
|
||||||
the contributions from the community, whether it's proposing features, identifying bugs, or fixing mistakes! To ensure
|
the contributions from the community, whether it's proposing features, identifying bugs, or fixing mistakes! To ensure
|
||||||
that our collaboration is efficient and effective, please follow these guidelines.
|
that our collaboration is efficient and effective, please follow these guidelines.
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ Clearly describe the issue:
|
|||||||
|
|
||||||
- If it is a bug, please describe how to **reproduce** it. If possible, attach a _complete example_ which demonstrates
|
- If it is a bug, please describe how to **reproduce** it. If possible, attach a _complete example_ which demonstrates
|
||||||
the error. Please also state what you **expected** to happen instead of the error.
|
the error. Please also state what you **expected** to happen instead of the error.
|
||||||
- If you propose a change or addition, try to give an **example** what the improved code could look like or how to use
|
- If you propose a change or addition, try to give an **example** how the improved code could look like or how to use
|
||||||
it.
|
it.
|
||||||
- If you found a compilation error, please tell us which **compiler** (version and operating system) you used and paste
|
- If you found a compilation error, please tell us which **compiler** (version and operating system) you used and paste
|
||||||
the (relevant part of) the error messages to the ticket.
|
the (relevant part of) the error messages to the ticket.
|
||||||
@@ -66,21 +66,21 @@ certification that he or she has the right to submit the patch for inclusion int
|
|||||||
|
|
||||||
### Describe your changes
|
### Describe your changes
|
||||||
|
|
||||||
This library is primarily maintained as a spare-time project. As such, I cannot make any guarantee how quickly changes
|
This library is primarily maintained as a spare-time project. As such, I can not make any guarantee how quickly changes
|
||||||
are merged and released. Therefore, it is very important to make the review as smooth as possible by explaining not only
|
are merged and released. Therefore, it is very important to make the review as smooth as possible by explaining not only
|
||||||
_what_ you changed, but _why_. This rationale can be very valuable down the road when improvements or bugs are discussed
|
_what_ you changed, but _why_. This rationale can be very valuable down the road when improvements or bugs are discussed
|
||||||
years later.
|
years later.
|
||||||
|
|
||||||
### Reference an existing issue
|
### Reference existing issues
|
||||||
|
|
||||||
[Link a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue)
|
[Link a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue)
|
||||||
to clarify that a fix is forthcoming and which issue can be closed after merging. Only a few cases (e.g., fixing typos)
|
to clarify that a fix is forthcoming and which issue can be closed after merging. Only few cases (e.g., fixing typos)
|
||||||
do not require prior discussions.
|
don’t require prior discussions.
|
||||||
|
|
||||||
### Write tests
|
### Write tests
|
||||||
|
|
||||||
The library has an extensive test suite that currently covers [100 %](https://coveralls.io/github/nlohmann/json) of the
|
The library has an extensive test suite that currently covers [100 %](https://coveralls.io/github/nlohmann/json) of the
|
||||||
library's code. These tests are crucial to maintain API stability and give future contributors confidence that they do
|
library's code. These test are crucial to maintain API stability and give future contributors confidence that they do
|
||||||
not accidentally break things. As Titus Winters aptly put it:
|
not accidentally break things. As Titus Winters aptly put it:
|
||||||
|
|
||||||
> If you liked it, you should have put a test on it.
|
> If you liked it, you should have put a test on it.
|
||||||
@@ -98,7 +98,7 @@ $ ctest --test-dir build -j 10
|
|||||||
The test suite should report:
|
The test suite should report:
|
||||||
|
|
||||||
```
|
```
|
||||||
100% tests passed, 0 tests failed out of <number of tests>
|
100% tests passed, 0 tests failed out of 98
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Add tests
|
#### Add tests
|
||||||
@@ -108,9 +108,7 @@ The tests are located in [`tests/src/unit-*.cpp`](https://github.com/nlohmann/js
|
|||||||
are structured along the features of the library or the nature of the tests. Usually, it should be clear from the
|
are structured along the features of the library or the nature of the tests. Usually, it should be clear from the
|
||||||
context which existing file needs to be extended, and only very few cases require creating new test files.
|
context which existing file needs to be extended, and only very few cases require creating new test files.
|
||||||
|
|
||||||
When fixing a bug, edit `unit-regression3.cpp` and add a section referencing the fixed issue.
|
When fixing a bug, edit `unit-regression2.cpp` and add a section referencing the fixed issue.
|
||||||
`unit-regression2.cpp` holds the older tests; the two files exist because a single one grew large enough for the
|
|
||||||
MinGW linker to fail relocating it, so please keep adding to the smaller file rather than growing the larger one.
|
|
||||||
|
|
||||||
#### Exceptions
|
#### Exceptions
|
||||||
|
|
||||||
@@ -120,14 +118,14 @@ exception into account.
|
|||||||
#### Coverage
|
#### Coverage
|
||||||
|
|
||||||
If test coverage decreases, an automatic warning comment will be posted on the pull request. You can access a code
|
If test coverage decreases, an automatic warning comment will be posted on the pull request. You can access a code
|
||||||
coverage report as an artifact to the “Ubuntu” workflow.
|
coverage report as artifact to the “Ubuntu” workflow.
|
||||||
|
|
||||||
### Update the documentation
|
### Update the documentation
|
||||||
|
|
||||||
The [main documentation](https://json.nlohmann.me) of the library is generated from the files
|
The [main documentation](https://json.nlohmann.me) of the library is generated from the files
|
||||||
[`docs/mkdocs/docs`](https://github.com/nlohmann/json/blob/develop/docs/mkdocs/docs). This folder contains dedicated
|
[`docs/mkdocs/docs`](https://github.com/nlohmann/json/blob/develop/docs/mkdocs/docs). This folder contains dedicated
|
||||||
pages for [certain features](https://github.com/nlohmann/json/tree/develop/docs/mkdocs/docs/features), a list of
|
pages for [certain features](https://github.com/nlohmann/json/tree/develop/docs/mkdocs/docs/features), a list of
|
||||||
[all exceptions](https://github.com/nlohmann/json/blob/develop/docs/mkdocs/docs/home/exceptions.md), and
|
[all exceptions](https://github.com/nlohmann/json/blob/develop/docs/mkdocs/docs/home/exceptions.md), and an
|
||||||
[extensive API documentation](https://github.com/nlohmann/json/tree/develop/docs/mkdocs/docs/api) with details on every
|
[extensive API documentation](https://github.com/nlohmann/json/tree/develop/docs/mkdocs/docs/api) with details on every
|
||||||
public API function.
|
public API function.
|
||||||
|
|
||||||
@@ -138,28 +136,15 @@ make install_venv -C docs/mkdocs
|
|||||||
make serve -C docs/mkdocs
|
make serve -C docs/mkdocs
|
||||||
```
|
```
|
||||||
|
|
||||||
The documentation will then be available at <http://127.0.0.1:8000/>. See the documentation of
|
The documentation will then available at <http://127.0.0.1:8000/>. See the documentation of
|
||||||
[mkdocs](https://www.mkdocs.org) and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) for more
|
[mkdocs](https://www.mkdocs.org) and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) for more
|
||||||
information.
|
information.
|
||||||
|
|
||||||
Before opening a pull request, check the documentation like the CI does:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
make build -C docs/mkdocs # strict build: fails on broken links, anchors, and structure problems
|
|
||||||
make check_mermaid -C docs/mkdocs # checks the Mermaid diagrams (requires Node.js)
|
|
||||||
```
|
|
||||||
|
|
||||||
The search index of the docset is generated from [`mkdocs.yml`](https://github.com/nlohmann/json/blob/develop/docs/mkdocs/mkdocs.yml)
|
|
||||||
and each page's title (H1) and declaration by
|
|
||||||
[`docs/docset/generate_docset.py`](https://github.com/nlohmann/json/blob/develop/docs/docset/generate_docset.py);
|
|
||||||
`make build` reports API pages that cannot be classified.
|
|
||||||
|
|
||||||
### Amalgamate the source code
|
### Amalgamate the source code
|
||||||
|
|
||||||
The single-header files
|
The single-header files
|
||||||
[`single_include/nlohmann/json.hpp`](https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json.hpp),
|
[`single_include/nlohmann/json.hpp`](https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json.hpp) and
|
||||||
[`single_include/nlohmann/json_fwd.hpp`](https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json_fwd.hpp), and
|
[`single_include/nlohmann/json_fwd.hpp`](https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json_fwd.hpp)
|
||||||
[`single_include/nlohmann/json_literals.hpp`](https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json_literals.hpp)
|
|
||||||
are **generated** from the source files in the
|
are **generated** from the source files in the
|
||||||
[`include/nlohmann` directory](https://github.com/nlohmann/json/tree/develop/include/nlohmann). **Do not** edit the
|
[`include/nlohmann` directory](https://github.com/nlohmann/json/tree/develop/include/nlohmann). **Do not** edit the
|
||||||
files directly; instead, modify the include/nlohmann sources and regenerate the files by executing:
|
files directly; instead, modify the include/nlohmann sources and regenerate the files by executing:
|
||||||
@@ -168,21 +153,9 @@ files directly; instead, modify the include/nlohmann sources and regenerate the
|
|||||||
make amalgamate
|
make amalgamate
|
||||||
```
|
```
|
||||||
|
|
||||||
Running `make amalgamate` will also apply automatic formatting to the source files using
|
|
||||||
[`Artistic Style`](https://astyle.sourceforge.net/). This formatting may modify your source files in-place. Be certain to review and commit any changes to avoid unintended formatting diffs in commits.
|
|
||||||
|
|
||||||
If you add, rename, or remove a header in `include/nlohmann`, also regenerate the header list in
|
|
||||||
[`BUILD.bazel`](https://github.com/nlohmann/json/blob/develop/BUILD.bazel) (requires CMake) by executing:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
make BUILD.bazel
|
|
||||||
```
|
|
||||||
|
|
||||||
The amalgamation check in CI fails if any of these generated files is out of date.
|
|
||||||
|
|
||||||
## Recommended documentation
|
## Recommended documentation
|
||||||
|
|
||||||
- The library’s [README file](https://github.com/nlohmann/json/blob/develop/README.md) is an excellent starting point to
|
- The library’s [README file](https://github.com/nlohmann/json/blob/master/README.md) is an excellent starting point to
|
||||||
understand its functionality.
|
understand its functionality.
|
||||||
- The [documentation page](https://json.nlohmann.me) is the reference documentation of the library.
|
- The [documentation page](https://json.nlohmann.me) is the reference documentation of the library.
|
||||||
- [RFC 8259](https://datatracker.ietf.org/doc/html/rfc8259) is the reference for the JavaScript Object Notation (JSON)
|
- [RFC 8259](https://datatracker.ietf.org/doc/html/rfc8259) is the reference for the JavaScript Object Notation (JSON)
|
||||||
@@ -208,22 +181,19 @@ API of the 3.x.y version is broken. This includes:
|
|||||||
- Changing access specifiers.
|
- Changing access specifiers.
|
||||||
- Changing default arguments.
|
- Changing default arguments.
|
||||||
|
|
||||||
What is and is not covered by this guarantee is described in the
|
|
||||||
[roadmap](https://json.nlohmann.me/community/roadmap/#api-stability).
|
|
||||||
|
|
||||||
Although these guidelines may seem restrictive, they are essential for maintaining the library’s utility.
|
Although these guidelines may seem restrictive, they are essential for maintaining the library’s utility.
|
||||||
|
|
||||||
Breaking changes may be introduced when they are guarded with a feature macro such as
|
Breaking changes may be introduced when they are guarded with a feature macro such as
|
||||||
[`JSON_USE_IMPLICIT_CONVERSIONS`](https://json.nlohmann.me/api/macros/json_use_implicit_conversions/) which allows
|
[`JSON_USE_IMPLICIT_CONVERSIONS`](https://json.nlohmann.me/api/macros/json_use_implicit_conversions/) which allows to
|
||||||
selectively changing the behavior of the library. In next steps, the current behavior can then be deprecated. Using
|
selectively change the behavior of the library. In next steps, the current behavior can then be deprecated. Using
|
||||||
feature macros then allows users to test their code against the library in the next major release.
|
feature macros then allows users to test their code against the library in the next major release.
|
||||||
|
|
||||||
### Break C++11 language conformance
|
### Break C++11 language conformance
|
||||||
|
|
||||||
This library is designed to work with C++11 and later. This means that any
|
This library is designed to work with C++11 and later. This means that any
|
||||||
[supported C++11 compiler](https://github.com/nlohmann/json/blob/develop/README.md#supported-compilers) should compile
|
[supported C++11 compiler](https://github.com/nlohmann/json/blob/master/README.md#supported-compilers) should compile
|
||||||
the library without problems. Some compilers like GCC 4.7 (and earlier), Clang 3.3 (and earlier), or Microsoft Visual
|
the library without problems. Some compilers like GCC 4.7 (and earlier), Clang 3.3 (and earlier), or Microsoft Visual
|
||||||
C++ 2013 and earlier are known not to work due to missing or incomplete C++11 support.
|
Studio 13.0 and earlier are known not to work due to missing or incomplete C++11 support.
|
||||||
|
|
||||||
Please do not add features that do not work with the mentioned supported compilers. Please guard features from C++14 and
|
Please do not add features that do not work with the mentioned supported compilers. Please guard features from C++14 and
|
||||||
later against the respective [`JSON_HAS_CPP_14`](https://json.nlohmann.me/api/macros/json_has_cpp_11/) macros.
|
later against the respective [`JSON_HAS_CPP_14`](https://json.nlohmann.me/api/macros/json_has_cpp_11/) macros.
|
||||||
@@ -239,11 +209,12 @@ extension.
|
|||||||
The following areas really need contribution and are always welcomed:
|
The following areas really need contribution and are always welcomed:
|
||||||
|
|
||||||
- Extending the **continuous integration** toward more exotic compilers such as Android NDK, Intel's Compiler, or the
|
- Extending the **continuous integration** toward more exotic compilers such as Android NDK, Intel's Compiler, or the
|
||||||
bleeding-edge versions of Clang.
|
bleeding-edge versions Clang.
|
||||||
- Improving the efficiency of the **JSON parser**. The current parser is a hand-written iterative parser that keeps an
|
- Improving the efficiency of the **JSON parser**. The current parser is implemented as a naive recursive descent parser
|
||||||
explicit stack instead of recursing, with hand-coded string handling. Speeding up the lexer or the value construction
|
with hand coded string handling. More sophisticated approaches like LALR parsers would be really appreciated. That
|
||||||
would be appreciated. Parser generators like Bison or ANTLR do not play nice with single-header files -- I really
|
said, parser generators like Bison or ANTLR do not play nice with single-header files -- I really would like to keep
|
||||||
would like to keep the parser inside the `json.hpp` header.
|
the parser inside the `json.hpp` header, and I am not aware of approaches similar to [`re2c`](http://re2c.org) for
|
||||||
|
parsing.
|
||||||
- Extending and updating existing **benchmarks** to include (the most recent version of) this library. Though efficiency
|
- Extending and updating existing **benchmarks** to include (the most recent version of) this library. Though efficiency
|
||||||
is not everything, speed and memory consumption are very important characteristics for C++ developers, so having
|
is not everything, speed and memory consumption are very important characteristics for C++ developers, so having
|
||||||
proper comparisons would be interesting.
|
proper comparisons would be interesting.
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ body:
|
|||||||
Note that this form is for bug reports only. Please
|
Note that this form is for bug reports only. Please
|
||||||
[open a discussion](https://github.com/nlohmann/json/discussions/new)
|
[open a discussion](https://github.com/nlohmann/json/discussions/new)
|
||||||
for questions, feature requests, or support requests.
|
for questions, feature requests, or support requests.
|
||||||
**Please check the [FAQ](https://json.nlohmann.me/home/faq/) before
|
|
||||||
reporting an issue.** Common questions are answered there.
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: summary
|
id: summary
|
||||||
attributes:
|
attributes:
|
||||||
@@ -52,7 +50,7 @@ body:
|
|||||||
If possible, provide a small and self-contained example that triggers
|
If possible, provide a small and self-contained example that triggers
|
||||||
the bug. Please understand that we cannot analyze and debug large code
|
the bug. Please understand that we cannot analyze and debug large code
|
||||||
bases. Please do not paste screenshots here.
|
bases. Please do not paste screenshots here.
|
||||||
render: cpp
|
render: Shell
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: output
|
id: output
|
||||||
attributes:
|
attributes:
|
||||||
@@ -79,7 +77,7 @@ body:
|
|||||||
description: >
|
description: >
|
||||||
Which version of the library did you use? If it is a released version,
|
Which version of the library did you use? If it is a released version,
|
||||||
please enter the version number (e.g., 3.12.0). Otherwise, please enter
|
please enter the version number (e.g., 3.12.0). Otherwise, please enter
|
||||||
the commit hash. If you got the library from another source than the
|
the commit hash. If you got the library from another source as the
|
||||||
GitHub repository (e.g., via a package manager), please also state
|
GitHub repository (e.g., via a package manager), please also state
|
||||||
this.
|
this.
|
||||||
validations:
|
validations:
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
[Describe your pull request here. Please read the text below the line and make sure you follow the checklist.]
|
[Describe your pull request here. Please read the text below the line, and make sure you follow the checklist.]
|
||||||
|
|
||||||
- [ ] The changes are described in detail, both the what and why.
|
- [ ] The changes are described in detail, both the what and why.
|
||||||
- [ ] If applicable, an [existing issue](https://github.com/nlohmann/json/issues) is referenced.
|
- [ ] If applicable, an [existing issue](https://github.com/nlohmann/json/issues) is referenced.
|
||||||
- [ ] If applicable, a fixed [OSS-Fuzz](https://issues.oss-fuzz.com) issue is referenced as `OSS-Fuzz: <id>` (see [fuzz testing](https://github.com/nlohmann/json/blob/develop/tests/fuzzing.md#handling-oss-fuzz-reports)).
|
|
||||||
- [ ] The [Code coverage](https://coveralls.io/github/nlohmann/json) remained at 100%. A test case for every new line of code.
|
- [ ] The [Code coverage](https://coveralls.io/github/nlohmann/json) remained at 100%. A test case for every new line of code.
|
||||||
- [ ] If applicable, the [documentation](https://json.nlohmann.me) is updated.
|
- [ ] If applicable, the [documentation](https://json.nlohmann.me) is updated.
|
||||||
- [ ] The source code is amalgamated by running `make amalgamate`.
|
- [ ] The source code is amalgamated by running `make amalgamate`.
|
||||||
|
|||||||
+3
-22
@@ -9,31 +9,12 @@ identified a security vulnerability in this repository, please use the GitHub Se
|
|||||||
Until it is published, this draft security advisory will only be visible to the maintainers of this project. Other
|
Until it is published, this draft security advisory will only be visible to the maintainers of this project. Other
|
||||||
users and teams may be added once the advisory is created.
|
users and teams may be added once the advisory is created.
|
||||||
|
|
||||||
We will send a first response within 14 days, indicating the next steps in handling your report. After the initial
|
We will send a response indicating the next steps in handling your report. After the initial reply to your report, we
|
||||||
reply to your report, we will keep you informed of the progress towards a fix and full announcement and may ask for
|
will keep you informed of the progress towards a fix and full announcement and may ask for additional information or
|
||||||
additional information or guidance.
|
guidance.
|
||||||
|
|
||||||
For vulnerabilities in third-party dependencies or modules, please report them directly to the respective maintainers.
|
For vulnerabilities in third-party dependencies or modules, please report them directly to the respective maintainers.
|
||||||
|
|
||||||
## Disclosure and credit
|
|
||||||
|
|
||||||
Once a fix is released, we publish the security advisory and list the fixed vulnerability in the release notes. We
|
|
||||||
credit the reporter in both, unless they ask not to be named.
|
|
||||||
|
|
||||||
## Supported versions
|
|
||||||
|
|
||||||
Security fixes are made on the `develop` branch and shipped with the next release. Only the latest release receives
|
|
||||||
security fixes; they are not backported to older releases. A release stops receiving security fixes when the next
|
|
||||||
release is published, so please update to the latest release to get them.
|
|
||||||
|
|
||||||
## Unofficial packages
|
|
||||||
|
|
||||||
This project does not publish an official npm package. The npm package
|
|
||||||
[`nlohmann-json`](https://www.npmjs.com/package/nlohmann-json) (or similarly named packages) is not maintained or
|
|
||||||
endorsed by this project. See the
|
|
||||||
[package managers documentation](https://json.nlohmann.me/integration/package_managers/#npm) for supported
|
|
||||||
integration options.
|
|
||||||
|
|
||||||
## Additional Resources
|
## Additional Resources
|
||||||
|
|
||||||
- Explore security-related topics and contribute to tools and projects through
|
- Explore security-related topics and contribute to tools and projects through
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ sentimentBotReplyComment: >
|
|||||||
|
|
||||||
# *Required* Comment to reply with
|
# *Required* Comment to reply with
|
||||||
requestInfoReplyComment: >
|
requestInfoReplyComment: >
|
||||||
We would appreciate it if you could provide us with more info about this issue or pull request! Please check the [issue template](https://github.com/nlohmann/json/issues/new/choose) and the [pull request template](https://github.com/nlohmann/json/blob/develop/.github/PULL_REQUEST_TEMPLATE.md).
|
We would appreciate it if you could provide us with more info about this issue or pull request! Please check the [issue template](https://github.com/nlohmann/json/blob/develop/.github/ISSUE_TEMPLATE.md) and the [pull request template](https://github.com/nlohmann/json/blob/develop/.github/PULL_REQUEST_TEMPLATE.md).
|
||||||
|
|
||||||
# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
|
# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
|
||||||
requestInfoLabelToAdd: "state: needs more info"
|
requestInfoLabelToAdd: "state: needs more info"
|
||||||
|
|||||||
@@ -4,59 +4,28 @@ updates:
|
|||||||
directory: /
|
directory: /
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
cooldown:
|
|
||||||
default-days: 7
|
|
||||||
groups:
|
|
||||||
codeql-action:
|
|
||||||
patterns:
|
|
||||||
- "github/codeql-action/*"
|
|
||||||
|
|
||||||
- package-ecosystem: pip
|
- package-ecosystem: pip
|
||||||
directory: /docs/mkdocs
|
directory: /docs/mkdocs
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
cooldown:
|
|
||||||
default-days: 7
|
|
||||||
|
|
||||||
- package-ecosystem: npm
|
|
||||||
directory: /docs/mkdocs/scripts/mermaid
|
|
||||||
schedule:
|
|
||||||
interval: daily
|
|
||||||
cooldown:
|
|
||||||
default-days: 7
|
|
||||||
ignore:
|
|
||||||
# Material for MkDocs loads mermaid@11; keep the checker on the same major version
|
|
||||||
- dependency-name: mermaid
|
|
||||||
update-types: ["version-update:semver-major"]
|
|
||||||
|
|
||||||
- package-ecosystem: pip
|
- package-ecosystem: pip
|
||||||
directory: /tools/astyle
|
directory: /tools/astyle
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
cooldown:
|
|
||||||
default-days: 7
|
|
||||||
ignore:
|
|
||||||
# astyle is deliberately pinned (see tools/astyle/requirements.txt): newer versions
|
|
||||||
# reformat the code, and the pinned version defines the formatting CI enforces
|
|
||||||
- dependency-name: astyle
|
|
||||||
|
|
||||||
- package-ecosystem: pip
|
- package-ecosystem: pip
|
||||||
directory: /tools/generate_natvis
|
directory: /tools/generate_natvis
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
cooldown:
|
|
||||||
default-days: 7
|
|
||||||
|
|
||||||
- package-ecosystem: pip
|
- package-ecosystem: pip
|
||||||
directory: /tools/serve_header
|
directory: /tools/serve_header
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
cooldown:
|
|
||||||
default-days: 7
|
|
||||||
|
|
||||||
- package-ecosystem: pip
|
- package-ecosystem: pip
|
||||||
directory: /cmake/requirements
|
directory: /cmake/requirements
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
cooldown:
|
|
||||||
default-days: 7
|
|
||||||
@@ -16,10 +16,6 @@ only_commits:
|
|||||||
|
|
||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
# The Visual Studio 2017 jobs compile everything with /std:c++17, so they
|
|
||||||
# only build the C++17 variant of each test, split into two jobs each to
|
|
||||||
# stay below AppVeyor's 60-minute limit per job. The Visual Studio 2019
|
|
||||||
# job builds the tests for all standards and is split for the same reason.
|
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
configuration: Debug
|
configuration: Debug
|
||||||
platform: x86
|
platform: x86
|
||||||
@@ -34,30 +30,26 @@ environment:
|
|||||||
CMAKE_OPTIONS: ""
|
CMAKE_OPTIONS: ""
|
||||||
GENERATOR: Visual Studio 14 2015
|
GENERATOR: Visual Studio 14 2015
|
||||||
|
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
|
configuration: Release
|
||||||
|
platform: x86
|
||||||
|
name: with_win_header
|
||||||
|
CXX_FLAGS: "/W4 /WX"
|
||||||
|
CMAKE_OPTIONS: ""
|
||||||
|
GENERATOR: Visual Studio 14 2015
|
||||||
|
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
configuration: Release
|
configuration: Release
|
||||||
platform: x86
|
platform: x86
|
||||||
CXX_FLAGS: "/permissive- /std:c++17 /utf-8 /W4 /WX"
|
CXX_FLAGS: "/permissive- /std:c++17 /utf-8 /W4 /WX"
|
||||||
CMAKE_OPTIONS: "-DJSON_TestStandards=17 -DJSON_TestShard=0/2"
|
CMAKE_OPTIONS: ""
|
||||||
GENERATOR: Visual Studio 15 2017
|
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
|
||||||
configuration: Release
|
|
||||||
platform: x86
|
|
||||||
CXX_FLAGS: "/permissive- /std:c++17 /utf-8 /W4 /WX"
|
|
||||||
CMAKE_OPTIONS: "-DJSON_TestStandards=17 -DJSON_TestShard=1/2"
|
|
||||||
GENERATOR: Visual Studio 15 2017
|
GENERATOR: Visual Studio 15 2017
|
||||||
|
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
configuration: Release
|
configuration: Release
|
||||||
platform: x86
|
platform: x86
|
||||||
CXX_FLAGS: "/W4 /WX"
|
CXX_FLAGS: "/W4 /WX"
|
||||||
CMAKE_OPTIONS: "-DJSON_ImplicitConversions=OFF -DJSON_TestShard=0/2"
|
CMAKE_OPTIONS: "-DJSON_ImplicitConversions=OFF"
|
||||||
GENERATOR: Visual Studio 16 2019
|
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
|
||||||
configuration: Release
|
|
||||||
platform: x86
|
|
||||||
CXX_FLAGS: "/W4 /WX"
|
|
||||||
CMAKE_OPTIONS: "-DJSON_ImplicitConversions=OFF -DJSON_TestShard=1/2"
|
|
||||||
GENERATOR: Visual Studio 16 2019
|
GENERATOR: Visual Studio 16 2019
|
||||||
|
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
@@ -71,13 +63,7 @@ environment:
|
|||||||
configuration: Release
|
configuration: Release
|
||||||
platform: x64
|
platform: x64
|
||||||
CXX_FLAGS: "/permissive- /std:c++17 /Zc:__cplusplus /utf-8 /W4 /WX"
|
CXX_FLAGS: "/permissive- /std:c++17 /Zc:__cplusplus /utf-8 /W4 /WX"
|
||||||
CMAKE_OPTIONS: "-DJSON_TestStandards=17 -DJSON_TestShard=0/2"
|
CMAKE_OPTIONS: ""
|
||||||
GENERATOR: Visual Studio 15 2017
|
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
|
||||||
configuration: Release
|
|
||||||
platform: x64
|
|
||||||
CXX_FLAGS: "/permissive- /std:c++17 /Zc:__cplusplus /utf-8 /W4 /WX"
|
|
||||||
CMAKE_OPTIONS: "-DJSON_TestStandards=17 -DJSON_TestShard=1/2"
|
|
||||||
GENERATOR: Visual Studio 15 2017
|
GENERATOR: Visual Studio 15 2017
|
||||||
|
|
||||||
init:
|
init:
|
||||||
@@ -88,10 +74,18 @@ install:
|
|||||||
- if "%platform%"=="x86" set GENERATOR_PLATFORM=Win32
|
- if "%platform%"=="x86" set GENERATOR_PLATFORM=Win32
|
||||||
|
|
||||||
before_build:
|
before_build:
|
||||||
- cmake . -G "%GENERATOR%" -A "%GENERATOR_PLATFORM%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin" -DJSON_BuildTests=On %CMAKE_OPTIONS%
|
# for with_win_header build, inject the inclusion of Windows.h to the single-header library
|
||||||
|
- ps: if ($env:name -Eq "with_win_header") { $header_path = "single_include\nlohmann\json.hpp" }
|
||||||
|
- ps: if ($env:name -Eq "with_win_header") { "#include <Windows.h>`n" + (Get-Content $header_path | Out-String) | Set-Content $header_path }
|
||||||
|
- cmake . -G "%GENERATOR%" -A "%GENERATOR_PLATFORM%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin" -DJSON_BuildTests=On "%CMAKE_OPTIONS%"
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cmake --build . --config "%configuration%" --parallel 2
|
- cmake --build . --config "%configuration%" --parallel 2
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- ctest -C "%configuration%" --parallel 2 --output-on-failure
|
- if "%configuration%"=="Release" ctest -C "%configuration%" --parallel 2 --output-on-failure
|
||||||
|
# On Debug builds, skip test-unicode_all
|
||||||
|
# as it is extremely slow to run and cause
|
||||||
|
# occasional timeouts on AppVeyor.
|
||||||
|
# More info: https://github.com/nlohmann/json/pull/1570
|
||||||
|
- if "%configuration%"=="Debug" ctest --exclude-regex "test-unicode" -C "%configuration%" --parallel 2 --output-on-failure
|
||||||
+3
-54
@@ -21,64 +21,13 @@ labels:
|
|||||||
files:
|
files:
|
||||||
- "cmake/.*"
|
- "cmake/.*"
|
||||||
|
|
||||||
# other build systems
|
- label: "CI"
|
||||||
- label: "CMake"
|
|
||||||
files:
|
files:
|
||||||
- "(meson\\.build|meson_options\\.txt|BUILD\\.bazel|MODULE\\.bazel|Package\\.swift)"
|
- "github/workflows/.*"
|
||||||
|
|
||||||
- label: "documentation"
|
|
||||||
files:
|
|
||||||
- ".github/ISSUE_TEMPLATE/.*"
|
|
||||||
- ".github/config\\.yml"
|
|
||||||
- ".github/(CONTRIBUTING|SECURITY|CODE_OF_CONDUCT|PULL_REQUEST_TEMPLATE)\\.md"
|
|
||||||
|
|
||||||
- label: "CI"
|
- label: "CI"
|
||||||
files:
|
files:
|
||||||
- ".github/workflows/.*"
|
- "github/external_ci/.*"
|
||||||
|
|
||||||
- label: "CI"
|
|
||||||
files:
|
|
||||||
- ".github/external_ci/.*"
|
|
||||||
|
|
||||||
- label: "CI"
|
|
||||||
files:
|
|
||||||
- ".github/(dependabot|labeler)\\.yml"
|
|
||||||
|
|
||||||
- label: "aspect: binary formats"
|
|
||||||
files:
|
|
||||||
- "include/nlohmann/detail/input/binary_reader\\.hpp"
|
|
||||||
- "include/nlohmann/detail/output/binary_writer\\.hpp"
|
|
||||||
- "tests/src/unit-(bson|cbor|msgpack|ubjson|bjdata|bon8|binary_formats)"
|
|
||||||
- "tests/src/fuzzer-parse_(bson|cbor|msgpack|ubjson|bjdata|bon8)"
|
|
||||||
- "docs/mkdocs/docs/features/binary_formats/"
|
|
||||||
- "docs/mkdocs/docs/(api/basic_json|examples)/(to|from)_(bson|cbor|msgpack|ubjson|bjdata|bon8)"
|
|
||||||
|
|
||||||
- label: "aspect: binary formats"
|
|
||||||
title: "(?i)(bson|cbor|msgpack|messagepack|ubjson|bjdata|bon8|binary format)"
|
|
||||||
|
|
||||||
- label: "aspect: json_view"
|
|
||||||
files:
|
|
||||||
- "include/nlohmann/json_view\\.hpp"
|
|
||||||
- "include/nlohmann/detail/view/.*"
|
|
||||||
- "single_include/nlohmann/json_view\\.hpp"
|
|
||||||
- "tests/src/unit-json_view.*"
|
|
||||||
- "tests/src/json_view_test_helpers\\.hpp"
|
|
||||||
- "tests/src/fuzzer-(parse_json_view|json_view_image)\\.cpp"
|
|
||||||
- "tests/benchmarks/json_view/.*"
|
|
||||||
- "tools/amalgamate/config_json_view\\.json"
|
|
||||||
- "docs/mkdocs/docs/features/json_view\\.md"
|
|
||||||
- "docs/mkdocs/docs/api/basic_json_(document|view)/.*"
|
|
||||||
- "docs/mkdocs/docs/api/(ordered_)?json_(editable_)?(document|view)\\.md"
|
|
||||||
- "docs/mkdocs/docs/examples/(basic_json_(document|view)__|(ordered_)?json_(editable_)?(document|view)).*"
|
|
||||||
- "tests/benchmarks/src/benchmarks_view\\.cpp"
|
|
||||||
|
|
||||||
- label: "aspect: json_view"
|
|
||||||
title: "(?i)(json_view|json_document|zero-copy)"
|
|
||||||
|
|
||||||
- label: "python"
|
|
||||||
files:
|
|
||||||
- "\\.py$"
|
|
||||||
- "requirements[^/]*\\.txt$"
|
|
||||||
|
|
||||||
- label: "S"
|
- label: "S"
|
||||||
size-below: 10
|
size-below: 10
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
name: "Cancel runs of closed pull requests"
|
|
||||||
|
|
||||||
# The concurrency groups of the other workflows cancel superseded runs when a
|
|
||||||
# pull request gets new commits, but nothing stops the runs of its last commit
|
|
||||||
# once the pull request is merged or closed. They then keep the runners busy
|
|
||||||
# for hours while the queue of the open pull requests waits.
|
|
||||||
#
|
|
||||||
# pull_request_target is needed to get a token that can cancel runs for pull
|
|
||||||
# requests from forks. This is safe because the workflow never checks out or
|
|
||||||
# runs code from the pull request; it only calls the API.
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
types: [closed]
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
cancel:
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
|
|
||||||
runs-on: ubuntu-26.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
|
||||||
with:
|
|
||||||
egress-policy: audit
|
|
||||||
|
|
||||||
- name: Cancel unfinished runs of the pull request's head commit
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GH_REPO: ${{ github.repository }}
|
|
||||||
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
||||||
SELF: ${{ github.run_id }}
|
|
||||||
# only runs triggered by the pull request: when a branch is pushed to
|
|
||||||
# develop directly, its push runs share the head commit
|
|
||||||
run: |
|
|
||||||
gh api --paginate "repos/$GH_REPO/actions/runs?head_sha=$HEAD_SHA&per_page=100" \
|
|
||||||
--jq ".workflow_runs[]
|
|
||||||
| select(.status != \"completed\" and .id != $SELF)
|
|
||||||
| select(.event == \"pull_request\" or .event == \"pull_request_target\")
|
|
||||||
| \"\(.id) \(.name)\"" |
|
|
||||||
while read -r id name; do
|
|
||||||
echo "Cancelling run $id ($name)"
|
|
||||||
# a run may finish between listing and cancelling; that is not an error
|
|
||||||
gh run cancel "$id" || true
|
|
||||||
done
|
|
||||||
@@ -2,27 +2,16 @@ name: "Check amalgamation"
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
# also check develop itself: a PR can be merged before its own run of this
|
|
||||||
# workflow completes (e.g. while it is still queued), leaving single_include
|
|
||||||
# stale on develop without any failing check
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- develop
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
save:
|
save:
|
||||||
if: github.event_name == 'pull_request'
|
runs-on: ubuntu-latest
|
||||||
runs-on: ubuntu-26.04
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
@@ -31,174 +20,57 @@ jobs:
|
|||||||
mkdir -p ./pr
|
mkdir -p ./pr
|
||||||
echo ${{ github.event.number }} > ./pr/number
|
echo ${{ github.event.number }} > ./pr/number
|
||||||
echo ${{ github.event.pull_request.user.login }} > ./pr/author
|
echo ${{ github.event.pull_request.user.login }} > ./pr/author
|
||||||
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: pr
|
name: pr
|
||||||
path: pr/
|
path: pr/
|
||||||
|
|
||||||
check:
|
check:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
MAIN_DIR: ${{ github.workspace }}/main
|
MAIN_DIR: ${{ github.workspace }}/main
|
||||||
INCLUDE_DIR: ${{ github.workspace }}/main/single_include/nlohmann
|
INCLUDE_DIR: ${{ github.workspace }}/main/single_include/nlohmann
|
||||||
TOOL_DIR: ${{ github.workspace }}/tools/tools/amalgamate
|
TOOL_DIR: ${{ github.workspace }}/tools/tools/amalgamate
|
||||||
NATVIS_TOOL_DIR: ${{ github.workspace }}/tools/tools/generate_natvis
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Checkout pull request or pushed commit
|
- name: Checkout pull request
|
||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
path: main
|
path: main
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Checkout tools
|
- name: Checkout tools
|
||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
path: tools
|
path: tools
|
||||||
ref: develop
|
ref: develop
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Install astyle
|
- name: Install astyle
|
||||||
run: |
|
run: |
|
||||||
python3 -mvenv venv
|
python3 -mvenv venv
|
||||||
venv/bin/pip3 install --require-hashes -r $MAIN_DIR/tools/astyle/requirements.txt
|
venv/bin/pip3 install -r $MAIN_DIR/tools/astyle/requirements.txt
|
||||||
|
|
||||||
- name: Install generate_natvis dependencies
|
- name: Check amalgamation
|
||||||
run: pip3 install --require-hashes -r $NATVIS_TOOL_DIR/requirements.txt
|
|
||||||
|
|
||||||
- name: Regenerate the tools/macro_builder tables in macro_scope.hpp
|
|
||||||
run: |
|
run: |
|
||||||
cd $MAIN_DIR
|
cd $MAIN_DIR
|
||||||
|
|
||||||
# Built from this PR's own tools/macro_builder/main.cpp, not a
|
rm -fr $INCLUDE_DIR/json.hpp~ $INCLUDE_DIR/json_fwd.hpp~
|
||||||
# develop checkout: unlike amalgamate.py, this tool has no other
|
cp $INCLUDE_DIR/json.hpp $INCLUDE_DIR/json.hpp~
|
||||||
# source of truth to check against (its own README documents that
|
cp $INCLUDE_DIR/json_fwd.hpp $INCLUDE_DIR/json_fwd.hpp~
|
||||||
# it must reproduce macro_scope.hpp byte for byte), so there is
|
|
||||||
# nothing to gain from checking out a separate copy, and doing so
|
|
||||||
# would make this step fail on a PR that adds support for a new
|
|
||||||
# dispatch table until that PR itself merges to develop.
|
|
||||||
TMPDIR=$(mktemp -d ./macro_builder_check.XXXXXX)
|
|
||||||
c++ -std=c++11 tools/macro_builder/main.cpp -o "$TMPDIR/macro_builder"
|
|
||||||
"$TMPDIR/macro_builder" > "$TMPDIR/paste.hpp"
|
|
||||||
"$TMPDIR/macro_builder" type_body > "$TMPDIR/type_body.hpp"
|
|
||||||
|
|
||||||
# Splice the (still unindented) generated blocks back into
|
|
||||||
# macro_scope.hpp; the astyle pass below indents their
|
|
||||||
# continuation lines the same way it does for the rest of
|
|
||||||
# include/, so a correctly regenerated file comes out unchanged.
|
|
||||||
awk -v newfile="$TMPDIR/paste.hpp" '
|
|
||||||
BEGIN { while ((getline line < newfile) > 0) { new = new line "\n" } }
|
|
||||||
/^#define NLOHMANN_JSON_EXPAND\( x \) x$/ { printf "%s", new; skip=1 }
|
|
||||||
skip && /^#define NLOHMANN_JSON_DOUBLE_PASTE63\(/ { skip=0; next }
|
|
||||||
skip { next }
|
|
||||||
{ print }
|
|
||||||
' include/nlohmann/detail/macro_scope.hpp > "$TMPDIR/macro_scope_1.hpp"
|
|
||||||
awk -v newfile="$TMPDIR/type_body.hpp" '
|
|
||||||
BEGIN { while ((getline line < newfile) > 0) { new = new line "\n" } }
|
|
||||||
/^#define NLOHMANN_JSON_TYPE_BODY\(Prefix, \.\.\.\)/ { printf "%s", new; skip=1 }
|
|
||||||
skip && /^[[:space:]]*NLOHMANN_JSON_TYPE_BODY_SENTINEL\)\)$/ { skip=0; next }
|
|
||||||
skip { next }
|
|
||||||
{ print }
|
|
||||||
' "$TMPDIR/macro_scope_1.hpp" > "$TMPDIR/macro_scope_2.hpp"
|
|
||||||
mv "$TMPDIR/macro_scope_2.hpp" include/nlohmann/detail/macro_scope.hpp
|
|
||||||
rm -rf "$TMPDIR"
|
|
||||||
|
|
||||||
- name: Regenerate amalgamation, formatting, and BUILD.bazel
|
|
||||||
run: |
|
|
||||||
cd $MAIN_DIR
|
|
||||||
|
|
||||||
python3 $TOOL_DIR/amalgamate.py -c $TOOL_DIR/config_json.json -s .
|
python3 $TOOL_DIR/amalgamate.py -c $TOOL_DIR/config_json.json -s .
|
||||||
python3 $TOOL_DIR/amalgamate.py -c $TOOL_DIR/config_json_fwd.json -s .
|
python3 $TOOL_DIR/amalgamate.py -c $TOOL_DIR/config_json_fwd.json -s .
|
||||||
# the configuration of json_view.hpp comes with the pull request until
|
echo "Format (1)"
|
||||||
# it is on develop; the tool itself is still develop's
|
${{ github.workspace }}/venv/bin/astyle --project=tools/astyle/.astylerc --suffix=none --quiet $INCLUDE_DIR/json.hpp $INCLUDE_DIR/json_fwd.hpp
|
||||||
python3 $TOOL_DIR/amalgamate.py -c $MAIN_DIR/tools/amalgamate/config_json_view.json -s .
|
|
||||||
|
|
||||||
# the header list of the Bazel "json" target must match the files in include/
|
diff $INCLUDE_DIR/json.hpp~ $INCLUDE_DIR/json.hpp
|
||||||
cmake -P cmake/scripts/gen_bazel_build_file.cmake
|
diff $INCLUDE_DIR/json_fwd.hpp~ $INCLUDE_DIR/json_fwd.hpp
|
||||||
|
|
||||||
${{ github.workspace }}/venv/bin/astyle --project=tools/astyle/.astylerc --suffix=none --quiet \
|
${{ github.workspace }}/venv/bin/astyle --project=tools/astyle/.astylerc --suffix=orig $(find docs/examples include tests -type f \( -name '*.hpp' -o -name '*.cpp' -o -name '*.cu' \) -not -path 'tests/thirdparty/*' -not -path 'tests/abi/include/nlohmann/*' | sort)
|
||||||
$INCLUDE_DIR/json.hpp $INCLUDE_DIR/json_fwd.hpp $INCLUDE_DIR/json_view.hpp
|
echo Check
|
||||||
|
find $MAIN_DIR -name '*.orig' -exec false {} \+
|
||||||
# fail loudly if a directory is renamed or removed: find would only warn
|
|
||||||
# about the missing path and silently drop its files from the check
|
|
||||||
SOURCE_DIRS="docs/mkdocs/docs/examples include tests"
|
|
||||||
for DIR in $SOURCE_DIRS; do
|
|
||||||
if [ ! -d "$DIR" ]; then
|
|
||||||
echo "::error::source directory '$DIR' does not exist"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
${{ github.workspace }}/venv/bin/astyle --project=tools/astyle/.astylerc --suffix=none --quiet \
|
|
||||||
$(find $SOURCE_DIRS -type f \( -name '*.hpp' -o -name '*.cpp' -o -name '*.cu' \) -not -path 'tests/thirdparty/*' -not -path 'tests/abi/include/nlohmann/*' | sort)
|
|
||||||
|
|
||||||
# json_literals.hpp is copied verbatim from the (now formatted) include/
|
|
||||||
# directory, like `make amalgamate` does
|
|
||||||
cp include/nlohmann/json_literals.hpp $INCLUDE_DIR/json_literals.hpp
|
|
||||||
|
|
||||||
- name: Regenerate nlohmann_json.natvis
|
|
||||||
run: |
|
|
||||||
cd $MAIN_DIR
|
|
||||||
# The generator and its template are what this check verifies the
|
|
||||||
# committed natvis file against (which namespaces it lists, and
|
|
||||||
# what each entry looks like), so run this PR's copy rather than
|
|
||||||
# the develop checkout's: with develop's, a PR that changes either
|
|
||||||
# could never pass. generate_natvis.py loads the template from its
|
|
||||||
# own directory. Like the macro_builder step above, this only runs
|
|
||||||
# PR content in a job without credentials.
|
|
||||||
python3 tools/generate_natvis/generate_natvis.py $MAIN_DIR
|
|
||||||
|
|
||||||
- name: Check the nlohmann_json.natvis generator options
|
|
||||||
run: |
|
|
||||||
cd $MAIN_DIR
|
|
||||||
# The options for configurations outside the checked-in file write
|
|
||||||
# to a temporary file, so they do not affect the diff below.
|
|
||||||
GENERATOR=tools/generate_natvis/generate_natvis.py
|
|
||||||
python3 $GENERATOR --list-tags
|
|
||||||
TAG_COUNT=$(python3 $GENERATOR --list-tags | wc -l)
|
|
||||||
|
|
||||||
python3 $GENERATOR --abi-tags diag,_dp,_ns --abi-tags _diag --output $RUNNER_TEMP/abi_tags.natvis
|
|
||||||
grep -q '<!-- Namespace nlohmann::json_abi_diag_dp_ns -->' $RUNNER_TEMP/abi_tags.natvis
|
|
||||||
grep -q '<!-- Namespace nlohmann::json_abi_diag_dp_ns_v[0-9_]* -->' $RUNNER_TEMP/abi_tags.natvis
|
|
||||||
test $(grep -c '<!-- Namespace ' $RUNNER_TEMP/abi_tags.natvis) -eq $(( $(grep -c '<!-- Namespace ' nlohmann_json.natvis) + 2 ))
|
|
||||||
|
|
||||||
python3 $GENERATOR --all --output $RUNNER_TEMP/all.natvis
|
|
||||||
test $(grep -c '<!-- Namespace ' $RUNNER_TEMP/all.natvis) -eq $(( (1 << TAG_COUNT) * 2 + 1 ))
|
|
||||||
|
|
||||||
if python3 $GENERATOR --abi-tags _unknown --output $RUNNER_TEMP/unknown.natvis; then
|
|
||||||
echo "generate_natvis.py accepted an unknown ABI tag"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Build patch and check for differences
|
|
||||||
id: diff
|
|
||||||
run: |
|
|
||||||
cd $MAIN_DIR
|
|
||||||
mkdir -p ${{ github.workspace }}/patch
|
|
||||||
git diff --patch --no-color > ${{ github.workspace }}/patch/amalgamation.patch
|
|
||||||
if [ -s ${{ github.workspace }}/patch/amalgamation.patch ]; then
|
|
||||||
echo "The source code has not been amalgamated/formatted correctly, or BUILD.bazel, nlohmann_json.natvis, or the macro_builder tables in macro_scope.hpp are out of date ('make amalgamate BUILD.bazel natvis' fixes all but the tables, see tools/macro_builder/README.md). Diff:"
|
|
||||||
cat ${{ github.workspace }}/patch/amalgamation.patch
|
|
||||||
echo "has_diff=true" >> "$GITHUB_OUTPUT"
|
|
||||||
else
|
|
||||||
echo "has_diff=false" >> "$GITHUB_OUTPUT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Uploaded so contributors can fix their PR with `git apply amalgamation.patch`
|
|
||||||
# instead of installing the pinned astyle version locally.
|
|
||||||
- name: Upload patch
|
|
||||||
if: steps.diff.outputs.has_diff == 'true'
|
|
||||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
||||||
with:
|
|
||||||
name: amalgamation-patch
|
|
||||||
path: patch/amalgamation.patch
|
|
||||||
|
|
||||||
- name: Fail if not amalgamated/formatted
|
|
||||||
if: steps.diff.outputs.has_diff == 'true'
|
|
||||||
run: exit 1
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
name: Check documentation links
|
|
||||||
|
|
||||||
# check the links of the documentation weekly; external links break without any change in this repository
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '17 4 * * 1'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check_docs_links:
|
|
||||||
if: github.repository == 'nlohmann/json'
|
|
||||||
runs-on: ubuntu-26.04
|
|
||||||
timeout-minutes: 30
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
|
||||||
with:
|
|
||||||
egress-policy: audit
|
|
||||||
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Install virtual environment
|
|
||||||
run: make install_venv -C docs/mkdocs
|
|
||||||
|
|
||||||
- name: Check links
|
|
||||||
shell: bash # adds -o pipefail, so tee does not hide the exit code
|
|
||||||
run: make link_check -C docs/mkdocs 2>&1 | tee link_check.log
|
|
||||||
|
|
||||||
- name: Summarize broken links
|
|
||||||
if: failure()
|
|
||||||
run: |
|
|
||||||
{
|
|
||||||
echo '### Broken documentation links'
|
|
||||||
echo '```'
|
|
||||||
grep 'invalid url' link_check.log || true
|
|
||||||
echo '```'
|
|
||||||
} >> "$GITHUB_STEP_SUMMARY"
|
|
||||||
@@ -1,41 +1,34 @@
|
|||||||
name: CIFuzz
|
name: CIFuzz
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Fuzzing:
|
Fuzzing:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
# The OSS-Fuzz CIFuzz actions are referenced via @master as recommended by
|
|
||||||
# the OSS-Fuzz documentation; the project does not publish tags or releases
|
|
||||||
# to pin to. See https://google.github.io/oss-fuzz/getting-started/continuous-integration/
|
|
||||||
- name: Build Fuzzers
|
- name: Build Fuzzers
|
||||||
id: build
|
id: build
|
||||||
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
|
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@57fe4475324c5506adbfecdcdd2917f65c86ee9e # master
|
||||||
with:
|
with:
|
||||||
oss-fuzz-project-name: 'json'
|
oss-fuzz-project-name: 'json'
|
||||||
dry-run: false
|
dry-run: false
|
||||||
language: c++
|
language: c++
|
||||||
- name: Run Fuzzers
|
- name: Run Fuzzers
|
||||||
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
|
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@57fe4475324c5506adbfecdcdd2917f65c86ee9e # master
|
||||||
with:
|
with:
|
||||||
oss-fuzz-project-name: 'json'
|
oss-fuzz-project-name: 'json'
|
||||||
fuzz-seconds: 300
|
fuzz-seconds: 300
|
||||||
dry-run: false
|
dry-run: false
|
||||||
language: c++
|
language: c++
|
||||||
- name: Upload Crash
|
- name: Upload Crash
|
||||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
if: failure() && steps.build.outcome == 'success'
|
if: failure() && steps.build.outcome == 'success'
|
||||||
with:
|
with:
|
||||||
name: artifacts
|
name: artifacts
|
||||||
|
|||||||
@@ -21,30 +21,29 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
CodeQL-Build:
|
CodeQL-Build:
|
||||||
|
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
security-events: write
|
security-events: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
uses: github/codeql-action/init@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3.28.14
|
||||||
with:
|
with:
|
||||||
languages: c-cpp
|
languages: c-cpp
|
||||||
# Analyze the sources without compiling them. Autobuild compiled the
|
|
||||||
# whole test suite and the resulting database was so large that the
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# runner often lost communication with the server while importing it.
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
build-mode: none
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3.28.14
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
uses: github/codeql-action/analyze@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3.28.14
|
||||||
@@ -10,9 +10,8 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
comment:
|
comment:
|
||||||
# push runs on develop have no PR to comment on (and no "pr" artifact)
|
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||||
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request' }}
|
runs-on: ubuntu-latest
|
||||||
runs-on: ubuntu-26.04
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
actions: read
|
actions: read
|
||||||
@@ -20,13 +19,12 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: 'Download artifact'
|
- name: 'Download artifact'
|
||||||
id: download
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
||||||
@@ -37,14 +35,6 @@ jobs:
|
|||||||
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
||||||
return artifact.name == "pr"
|
return artifact.name == "pr"
|
||||||
})[0];
|
})[0];
|
||||||
// a run that failed before its jobs started (e.g. a stale queued
|
|
||||||
// run cancelled long after its push) has no artifact to report on
|
|
||||||
if (!matchArtifact) {
|
|
||||||
core.notice('Run ${{ github.event.workflow_run.id }} has no "pr" artifact; nothing to comment on.');
|
|
||||||
core.setOutput('found', 'false');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
core.setOutput('found', 'true');
|
|
||||||
var download = await github.rest.actions.downloadArtifact({
|
var download = await github.rest.actions.downloadArtifact({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
@@ -53,35 +43,16 @@ jobs:
|
|||||||
});
|
});
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
|
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
|
||||||
|
- run: unzip pr.zip
|
||||||
var hasPatch = artifacts.data.artifacts.some((artifact) => artifact.name == "amalgamation-patch");
|
|
||||||
core.setOutput('has_patch', String(hasPatch));
|
|
||||||
# Extract the untrusted PR artifact into a dedicated empty directory and
|
|
||||||
# read only the two expected files by fixed path afterwards. This avoids a
|
|
||||||
# malicious archive overwriting workspace files or escaping via ../ paths.
|
|
||||||
- if: steps.download.outputs.found == 'true'
|
|
||||||
run: unzip -o pr.zip -d ./pr_artifact
|
|
||||||
|
|
||||||
- name: 'Comment on PR'
|
- name: 'Comment on PR'
|
||||||
if: steps.download.outputs.found == 'true'
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
script: |
|
script: |
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
// Both values come from a fork-triggered workflow and are therefore
|
const author = fs.readFileSync('./author')
|
||||||
// attacker-controlled. Validate them strictly before use to prevent
|
const issue_number = Number(fs.readFileSync('./number'));
|
||||||
// Markdown/mention injection and bogus REST API filters.
|
|
||||||
const author = fs.readFileSync('./pr_artifact/author', 'utf8').trim();
|
|
||||||
if (!/^[A-Za-z0-9-]{1,39}$/.test(author)) {
|
|
||||||
core.setFailed(`Refusing to proceed: untrusted author value '${author}' is not a valid GitHub username.`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const issue_number = Number(fs.readFileSync('./pr_artifact/number', 'utf8').trim());
|
|
||||||
if (!Number.isInteger(issue_number) || issue_number <= 0) {
|
|
||||||
core.setFailed('Refusing to proceed: untrusted PR number is not a positive integer.');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const opts = github.rest.issues.listForRepo.endpoint.merge({
|
const opts = github.rest.issues.listForRepo.endpoint.merge({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
@@ -99,20 +70,12 @@ jobs:
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const hasPatch = '${{ steps.download.outputs.has_patch }}' === 'true';
|
|
||||||
const runUrl = '${{ github.event.workflow_run.html_url }}';
|
|
||||||
|
|
||||||
await github.rest.issues.createComment({
|
await github.rest.issues.createComment({
|
||||||
issue_number: issue_number,
|
issue_number: issue_number,
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
body: '## 🔴 Amalgamation check failed! 🔴\nThe source code has not been amalgamated and/or formatted correctly, or `BUILD.bazel`, `nlohmann_json.natvis`, or the macro_builder tables in `macro_scope.hpp` are out of date. `make amalgamate BUILD.bazel natvis` fixes all but the tables (see `tools/macro_builder/README.md`).'
|
body: '## 🔴 Amalgamation check failed! 🔴\nThe source code has not been amalgamated.'
|
||||||
+ (hasPatch ? '\n\n📎 A ready-to-apply patch is attached to the [failed workflow run](' + runUrl + ') as the `amalgamation-patch` artifact.'
|
+ (first ? ' @' + author + ' Please read and follow the [Contribution Guidelines]'
|
||||||
+ ' Download it, then apply it locally from the repository root with:'
|
+ '(https://github.com/nlohmann/json/blob/develop/.github/CONTRIBUTING.md#files-to-change).'
|
||||||
+ '\n\n```shell\ngit apply amalgamation.patch\n```\n\n'
|
|
||||||
+ 'This does not require installing astyle yourself.'
|
|
||||||
: '')
|
|
||||||
+ (first ? '\n\n@' + author + ' Please read and follow the [Contribution Guidelines]'
|
|
||||||
+ '(https://github.com/nlohmann/json/blob/develop/.github/CONTRIBUTING.md#amalgamate-the-source-code).'
|
|
||||||
: '')
|
: '')
|
||||||
})
|
})
|
||||||
@@ -9,25 +9,19 @@
|
|||||||
name: 'Dependency Review'
|
name: 'Dependency Review'
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dependency-review:
|
dependency-review:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: 'Checkout Repository'
|
- name: 'Checkout Repository'
|
||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: 'Dependency Review'
|
- name: 'Dependency Review'
|
||||||
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
|
uses: actions/dependency-review-action@ce3cf9537a52e8119d91fd484ab5b8a807627bf8 # v4.6.0
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
# This workflow uses actions that are not certified by GitHub.
|
|
||||||
# They are provided by a third-party and are governed by
|
|
||||||
# separate terms of service, privacy policy, and support
|
|
||||||
# documentation.
|
|
||||||
|
|
||||||
name: flawfinder
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "develop" ]
|
|
||||||
pull_request:
|
|
||||||
# The branches below must be a subset of the branches above
|
|
||||||
branches: [ "develop" ]
|
|
||||||
schedule:
|
|
||||||
- cron: '41 14 * * 3'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
flawfinder:
|
|
||||||
name: Flawfinder
|
|
||||||
runs-on: ubuntu-26.04
|
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
contents: read
|
|
||||||
security-events: write
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
|
||||||
with:
|
|
||||||
egress-policy: audit
|
|
||||||
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: flawfinder_scan
|
|
||||||
uses: david-a-wheeler/flawfinder@c4216b74cf2639ffa98503768bd6e4299b5440c9 # v2.0.20
|
|
||||||
with:
|
|
||||||
# single_include/ is generated from include/ and would report every finding twice
|
|
||||||
arguments: "--sarif --exclude '*/single_include/*' ./"
|
|
||||||
output: 'flawfinder_results.sarif'
|
|
||||||
|
|
||||||
- name: Upload analysis results to GitHub Security tab
|
|
||||||
uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
|
||||||
with:
|
|
||||||
sarif_file: ${{github.workspace}}/flawfinder_results.sarif
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
name: "json_view benchmarks"
|
|
||||||
|
|
||||||
# On demand only: runs the comparison of json_view with yyjson, simdjson, and
|
|
||||||
# Boost.JSON (tests/benchmarks/json_view/compare.py) on GitHub-hosted runners,
|
|
||||||
# for numbers from x86-64 and AArch64 Linux. It runs when started by hand, or
|
|
||||||
# when a pull request gets the label "benchmark" (on both architectures, with
|
|
||||||
# GCC and the default settings). Shared runners are noisy: the results show
|
|
||||||
# where json_view stands, but published numbers need a quiet machine (see
|
|
||||||
# tests/benchmarks/json_view/README.md).
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
runner:
|
|
||||||
description: "Runner image"
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- ubuntu-24.04
|
|
||||||
- ubuntu-24.04-arm
|
|
||||||
default: ubuntu-24.04
|
|
||||||
compiler:
|
|
||||||
description: "Compiler"
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- g++
|
|
||||||
- clang++
|
|
||||||
default: g++
|
|
||||||
native:
|
|
||||||
description: "Compile for the runner's CPU (-march=native)"
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
rounds:
|
|
||||||
description: "Rounds of bench_view"
|
|
||||||
type: number
|
|
||||||
default: 30
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
# (the label is part of the group: adding an unrelated label must not cancel a running benchmark)
|
|
||||||
group: json-view-benchmarks-${{ github.workflow }}-${{ github.ref }}-${{ github.event.label.name }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
compare:
|
|
||||||
if: github.event_name == 'workflow_dispatch' || github.event.label.name == 'benchmark'
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
runner: ${{ fromJSON(github.event_name == 'workflow_dispatch' && format('["{0}"]', inputs.runner) || '["ubuntu-24.04", "ubuntu-24.04-arm"]') }}
|
|
||||||
runs-on: ${{ matrix.runner }}
|
|
||||||
timeout-minutes: 60
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
|
||||||
with:
|
|
||||||
egress-policy: audit
|
|
||||||
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Download test data
|
|
||||||
run: |
|
|
||||||
cmake -S . -B build -DJSON_BuildTests=On
|
|
||||||
cmake --build build --target download_test_data
|
|
||||||
|
|
||||||
- name: Run the comparison
|
|
||||||
env:
|
|
||||||
CXX: ${{ inputs.compiler || 'g++' }}
|
|
||||||
CC: ${{ inputs.compiler == 'clang++' && 'clang' || 'gcc' }}
|
|
||||||
ROUNDS: ${{ inputs.rounds || 30 }}
|
|
||||||
NATIVE: ${{ inputs.native && '--native' || '' }}
|
|
||||||
run: python3 tests/benchmarks/json_view/compare.py --data build/test_files --download --rounds "$ROUNDS" $NATIVE
|
|
||||||
|
|
||||||
- name: Summary
|
|
||||||
run: cat tests/benchmarks/json_view/results/*.md >> "$GITHUB_STEP_SUMMARY"
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
||||||
with:
|
|
||||||
name: json_view-benchmarks-${{ matrix.runner }}-${{ inputs.compiler || 'g++' }}
|
|
||||||
path: tests/benchmarks/json_view/results/
|
|
||||||
@@ -4,12 +4,6 @@ on:
|
|||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened, synchronize]
|
types: [opened, synchronize]
|
||||||
|
|
||||||
# pull_request_target runs on the base branch, so github.ref would put all pull
|
|
||||||
# requests into one group; group by pull request number instead
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
@@ -19,14 +13,14 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- uses: srvaroa/labeler@bf262763a8a8e191f5847873aecc0f29df84f957 # v1.14.0
|
- uses: srvaroa/labeler@e216fb40e2e6d3b17d90fb1d950f98bee92f65ce # master
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
+62
-50
@@ -17,18 +17,52 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
macos-15:
|
# macos-11 is deprecated
|
||||||
runs-on: macos-15 # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
|
# macos-11:
|
||||||
|
# runs-on: macos-11
|
||||||
|
# strategy:
|
||||||
|
# matrix:
|
||||||
|
# xcode: ['11.7', '12.4', '12.5.1', '13.0']
|
||||||
|
# env:
|
||||||
|
# DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||||
|
#
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
# - name: Run CMake
|
||||||
|
# run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
|
||||||
|
# - name: Build
|
||||||
|
# run: cmake --build build --parallel 10
|
||||||
|
# - name: Test
|
||||||
|
# run: cd build ; ctest -j 10 --output-on-failure
|
||||||
|
|
||||||
|
# macos-12 is deprecated (https://github.com/actions/runner-images/issues/10721)
|
||||||
|
# macos-12:
|
||||||
|
# runs-on: macos-12 # https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
|
||||||
|
# strategy:
|
||||||
|
# matrix:
|
||||||
|
# xcode: ['13.1', '13.2.1', '13.3.1', '13.4.1', '14.0', '14.0.1', '14.1']
|
||||||
|
# env:
|
||||||
|
# DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||||
|
#
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
# - name: Run CMake
|
||||||
|
# run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
|
||||||
|
# - name: Build
|
||||||
|
# run: cmake --build build --parallel 10
|
||||||
|
# - name: Test
|
||||||
|
# run: cd build ; ctest -j 10 --output-on-failure
|
||||||
|
|
||||||
|
macos-13:
|
||||||
|
runs-on: macos-13 # https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
xcode: ['16.0', '16.1', '16.2', '16.3', '16.4', '26.0.1', '26.1.1', '26.2', '26.3']
|
xcode: ['14.1', '14.2', '14.3', '14.3.1', '15.0.1', '15.1', '15.2']
|
||||||
env:
|
env:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
|
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
|
||||||
- name: Build
|
- name: Build
|
||||||
@@ -36,18 +70,33 @@ jobs:
|
|||||||
- name: Test
|
- name: Test
|
||||||
run: cd build ; ctest -j 10 --output-on-failure
|
run: cd build ; ctest -j 10 --output-on-failure
|
||||||
|
|
||||||
macos-26:
|
macos-14:
|
||||||
runs-on: macos-26 # https://github.com/actions/runner-images/blob/main/images/macos/macos-26-arm64-Readme.md
|
runs-on: macos-14 # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
xcode: ['26.4.1', '26.5', '26.6']
|
xcode: ['15.3', '15.4']
|
||||||
env:
|
env:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
- name: Run CMake
|
||||||
persist-credentials: false
|
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build --parallel 10
|
||||||
|
- name: Test
|
||||||
|
run: cd build ; ctest -j 10 --output-on-failure
|
||||||
|
|
||||||
|
macos-15:
|
||||||
|
runs-on: macos-15 # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
xcode: ['16.0', '16.1', '16.2']
|
||||||
|
env:
|
||||||
|
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
|
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
|
||||||
- name: Build
|
- name: Build
|
||||||
@@ -62,47 +111,10 @@ jobs:
|
|||||||
standard: [11, 14, 17, 20, 23, 26]
|
standard: [11, 14, 17, 20, 23, 26]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_TestStandards=${{ matrix.standard }}
|
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_TestStandards=${{ matrix.standard }}
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --parallel 10
|
run: cmake --build build --parallel 10
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cd build ; ctest -j 10 --output-on-failure
|
run: cd build ; ctest -j 10 --output-on-failure
|
||||||
|
|
||||||
swiftpm:
|
|
||||||
runs-on: macos-15
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Check that Package.swift resolves without a deprecation warning
|
|
||||||
run: swift package dump-package
|
|
||||||
- name: Build the SwiftPM documentation example against this checkout
|
|
||||||
run: |
|
|
||||||
mkdir -p /tmp/json-swiftpm-consumer/Sources/MyLibrary
|
|
||||||
cp docs/mkdocs/docs/integration/swift/example.cpp /tmp/json-swiftpm-consumer/Sources/MyLibrary/example.cpp
|
|
||||||
cat > /tmp/json-swiftpm-consumer/Package.swift << EOF
|
|
||||||
// swift-tools-version: 5.9
|
|
||||||
import PackageDescription
|
|
||||||
|
|
||||||
let package = Package(
|
|
||||||
name: "MyPackage",
|
|
||||||
dependencies: [
|
|
||||||
.package(path: "${{ github.workspace }}")
|
|
||||||
],
|
|
||||||
targets: [
|
|
||||||
.target(
|
|
||||||
name: "MyLibrary",
|
|
||||||
dependencies: [
|
|
||||||
.product(name: "json", package: "json")
|
|
||||||
],
|
|
||||||
publicHeadersPath: "."
|
|
||||||
)
|
|
||||||
]
|
|
||||||
)
|
|
||||||
EOF
|
|
||||||
cd /tmp/json-swiftpm-consumer
|
|
||||||
swift build
|
|
||||||
@@ -7,17 +7,7 @@ on:
|
|||||||
- develop
|
- develop
|
||||||
paths:
|
paths:
|
||||||
- docs/mkdocs/**
|
- docs/mkdocs/**
|
||||||
# the site also embeds these files via pymdownx.snippets
|
- docs/examples/**
|
||||||
# (mkdocs.yml sets restrict_base_path: false for this)
|
|
||||||
- .clang-tidy
|
|
||||||
- .github/CODE_OF_CONDUCT.md
|
|
||||||
- .github/CONTRIBUTING.md
|
|
||||||
- .github/SECURITY.md
|
|
||||||
- cmake/clang_flags.cmake
|
|
||||||
- cmake/gcc_flags.cmake
|
|
||||||
- include/nlohmann/detail/abi_macros.hpp
|
|
||||||
- tests/fmt_formatter/project/main.cpp
|
|
||||||
- tools/astyle/.astylerc
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
# we don't want to have concurrent jobs, and we don't want to cancel running jobs to avoid broken publications
|
# we don't want to have concurrent jobs, and we don't want to cancel running jobs to avoid broken publications
|
||||||
@@ -34,19 +24,14 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
if: github.repository == 'nlohmann/json'
|
if: github.repository == 'nlohmann/json'
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
# the git-revision-date-localized plugin needs the history for correct "last update" dates and so the
|
|
||||||
# strict build does not fail on a shallow clone
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Install virtual environment
|
- name: Install virtual environment
|
||||||
run: make install_venv -C docs/mkdocs
|
run: make install_venv -C docs/mkdocs
|
||||||
@@ -55,7 +40,7 @@ jobs:
|
|||||||
run: make build -C docs/mkdocs
|
run: make build -C docs/mkdocs
|
||||||
|
|
||||||
- name: Deploy documentation
|
- name: Deploy documentation
|
||||||
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
|
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./docs/mkdocs/site
|
publish_dir: ./docs/mkdocs/site
|
||||||
@@ -14,17 +14,13 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: ["develop"]
|
branches: ["develop"]
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analysis:
|
analysis:
|
||||||
name: Scorecard analysis
|
name: Scorecard analysis
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
# Needed to upload the results to code-scanning dashboard.
|
# Needed to upload the results to code-scanning dashboard.
|
||||||
security-events: write
|
security-events: write
|
||||||
@@ -40,17 +36,17 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: "Checkout code"
|
- name: "Checkout code"
|
||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: "Run analysis"
|
- name: "Run analysis"
|
||||||
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
|
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
|
||||||
with:
|
with:
|
||||||
results_file: results.sarif
|
results_file: results.sarif
|
||||||
results_format: sarif
|
results_format: sarif
|
||||||
@@ -72,7 +68,7 @@ jobs:
|
|||||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||||
# format to the repository Actions tab.
|
# format to the repository Actions tab.
|
||||||
- name: "Upload artifact"
|
- name: "Upload artifact"
|
||||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: SARIF file
|
name: SARIF file
|
||||||
path: results.sarif
|
path: results.sarif
|
||||||
@@ -80,6 +76,6 @@ jobs:
|
|||||||
|
|
||||||
# Upload the results to GitHub's code scanning dashboard.
|
# Upload the results to GitHub's code scanning dashboard.
|
||||||
- name: "Upload to code-scanning"
|
- name: "Upload to code-scanning"
|
||||||
uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
uses: github/codeql-action/upload-sarif@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3.28.14
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
# This workflow uses actions that are not certified by GitHub.
|
|
||||||
# They are provided by a third-party and are governed by
|
|
||||||
# separate terms of service, privacy policy, and support
|
|
||||||
# documentation.
|
|
||||||
|
|
||||||
# This workflow file requires a free account on Semgrep.dev to
|
|
||||||
# manage rules, file ignores, notifications, and more.
|
|
||||||
#
|
|
||||||
# See https://semgrep.dev/docs
|
|
||||||
|
|
||||||
name: Semgrep
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "develop" ]
|
|
||||||
pull_request:
|
|
||||||
# The branches below must be a subset of the branches above
|
|
||||||
branches: [ "develop" ]
|
|
||||||
schedule:
|
|
||||||
- cron: '23 2 * * 4'
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
semgrep:
|
|
||||||
permissions:
|
|
||||||
contents: read # for actions/checkout to fetch code
|
|
||||||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
|
||||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
|
||||||
name: Scan
|
|
||||||
runs-on: ubuntu-26.04
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
|
||||||
with:
|
|
||||||
egress-policy: audit
|
|
||||||
|
|
||||||
# Checkout project source
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
# The former returntocorp/semgrep-action is deprecated (the org was renamed
|
|
||||||
# to semgrep/*); the maintained approach is to install the CLI and invoke
|
|
||||||
# it directly. We use `semgrep scan` (not `semgrep ci`, which requires a
|
|
||||||
# login token): with no SEMGREP_APP_TOKEN configured this is exactly what
|
|
||||||
# the old action fell back to, running community rules with no token.
|
|
||||||
# SEMGREP_APP_TOKEN is still passed through so registry auth works if a
|
|
||||||
# token is ever added.
|
|
||||||
- name: Install Semgrep
|
|
||||||
run: python3 -m pip install --user --require-hashes -r cmake/requirements/requirements-semgrep.txt
|
|
||||||
|
|
||||||
# `semgrep scan --sarif` always exits 0 even with findings; continue-on-error
|
|
||||||
# is a safety net so the SARIF upload still runs if the scan itself errors.
|
|
||||||
- name: Run Semgrep
|
|
||||||
run: semgrep scan --config auto --sarif --output=semgrep.sarif
|
|
||||||
continue-on-error: true
|
|
||||||
env:
|
|
||||||
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
|
|
||||||
|
|
||||||
# Upload SARIF file generated in previous step
|
|
||||||
- name: Upload SARIF file
|
|
||||||
uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
|
||||||
with:
|
|
||||||
sarif_file: semgrep.sarif
|
|
||||||
if: always()
|
|
||||||
@@ -8,7 +8,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
@@ -16,11 +16,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0
|
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
|
||||||
with:
|
with:
|
||||||
stale-issue-label: 'state: stale'
|
stale-issue-label: 'state: stale'
|
||||||
stale-pr-label: 'state: stale'
|
stale-pr-label: 'state: stale'
|
||||||
|
|||||||
+59
-301
@@ -18,173 +18,91 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci_test_gcc:
|
ci_test_gcc:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
container: gcc:latest
|
container: gcc:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
- name: Get latest CMake and ninja
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
uses: lukka/get-cmake@28983e0d3955dba2bb0a6810caae0c6cf268ec0c # v4.0.0
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --target ci_test_gcc
|
run: cmake --build build --target ci_test_gcc
|
||||||
|
|
||||||
ci_meson_install:
|
|
||||||
runs-on: ubuntu-26.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
|
||||||
- name: Check that Meson and pkg-config offer the CMake options
|
|
||||||
run: make check_build_options
|
|
||||||
- name: Install Meson
|
|
||||||
run: pip install --require-hashes -r cmake/requirements/requirements-meson.txt
|
|
||||||
- name: Install with Meson
|
|
||||||
run: |
|
|
||||||
meson setup build-meson --prefix=${{ github.workspace }}/install
|
|
||||||
meson install -C build-meson
|
|
||||||
- name: Use the installed package with find_package
|
|
||||||
run: |
|
|
||||||
cmake -S tests/cmake_import/project -B build-import -DCMAKE_PREFIX_PATH=${{ github.workspace }}/install
|
|
||||||
cmake --build build-import
|
|
||||||
- name: Install with Meson and non-default options
|
|
||||||
run: |
|
|
||||||
meson setup build-meson-options --prefix=${{ github.workspace }}/install-options -DMultipleHeaders=true -DDiagnostics=true -DGlobalUDLs=false -DDisableTupleReferenceConversion=true -DStrictBinaryUTF8=true -DDeleteDeprecatedFunctions=true
|
|
||||||
meson install -C build-meson-options
|
|
||||||
- name: Check that the options reach the installed files
|
|
||||||
run: |
|
|
||||||
test -d install-options/include/nlohmann/detail
|
|
||||||
cflags=$(PKG_CONFIG_PATH=${{ github.workspace }}/install-options/share/pkgconfig pkg-config --cflags nlohmann_json)
|
|
||||||
echo "$cflags"
|
|
||||||
echo "$cflags" | grep -q -- '-DJSON_DIAGNOSTICS=1'
|
|
||||||
echo "$cflags" | grep -q -- '-DJSON_USE_GLOBAL_UDLS=0'
|
|
||||||
echo "$cflags" | grep -q -- '-DJSON_DISABLE_TUPLE_REFERENCE_CONVERSION=1'
|
|
||||||
echo "$cflags" | grep -q -- '-DJSON_STRICT_BINARY_UTF8=1'
|
|
||||||
echo "$cflags" | grep -q -- '-DJSON_DELETE_DEPRECATED_FUNCTIONS=1'
|
|
||||||
grep -q 'JSON_USE_GLOBAL_UDLS=0;JSON_DISABLE_TUPLE_REFERENCE_CONVERSION=1;JSON_DIAGNOSTICS=1' install-options/share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake
|
|
||||||
grep -q 'JSON_STRICT_BINARY_UTF8=1;JSON_DELETE_DEPRECATED_FUNCTIONS=1' install-options/share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake
|
|
||||||
cmake -S tests/cmake_import/project -B build-import-options -DCMAKE_PREFIX_PATH=${{ github.workspace }}/install-options
|
|
||||||
cmake --build build-import-options
|
|
||||||
- name: Install with Meson and the include directory outside the prefix
|
|
||||||
run: |
|
|
||||||
meson setup build-meson-split --prefix=${{ github.workspace }}/install-split --includedir=${{ github.workspace }}/install-split-dev/include
|
|
||||||
meson install -C build-meson-split
|
|
||||||
cmake -S tests/cmake_import/project -B build-import-split -DCMAKE_PREFIX_PATH=${{ github.workspace }}/install-split
|
|
||||||
cmake --build build-import-split
|
|
||||||
|
|
||||||
ci_infer:
|
ci_infer:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
|
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
|
||||||
with:
|
|
||||||
egress-policy: audit
|
|
||||||
|
|
||||||
- name: Install Infer
|
|
||||||
run: |
|
|
||||||
wget -q -O - "https://github.com/facebook/infer/releases/download/v1.3.0/infer-linux-x86_64-v1.3.0.tar.xz" | sudo tar -C /opt -xJ
|
|
||||||
sudo ln -s /opt/infer-linux-x86_64-v1.3.0/bin/infer /usr/local/bin/infer
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --target ci_infer
|
run: cmake --build build --target ci_infer
|
||||||
- name: Archive Infer report
|
|
||||||
if: always()
|
|
||||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
||||||
with:
|
|
||||||
name: infer-report
|
|
||||||
path: ${{ github.workspace }}/build/build_infer/infer-out/report.txt
|
|
||||||
if-no-files-found: ignore
|
|
||||||
|
|
||||||
ci_static_analysis_ubuntu:
|
ci_static_analysis_ubuntu:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: [ci_test_single_header, ci_cppcheck, ci_cpplint, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata, ci_reuse_compliance, ci_test_valgrind]
|
target: [ci_test_amalgamation, ci_test_single_header, ci_cppcheck, ci_cpplint, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata, ci_reuse_compliance, ci_test_valgrind]
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Install Valgrind
|
- name: Install Valgrind
|
||||||
if: matrix.target == 'ci_test_valgrind'
|
|
||||||
run: sudo apt-get update ; sudo apt-get install -y valgrind
|
run: sudo apt-get update ; sudo apt-get install -y valgrind
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
- name: Get latest CMake and ninja
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
uses: lukka/get-cmake@28983e0d3955dba2bb0a6810caae0c6cf268ec0c # v4.0.0
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --target ${{ matrix.target }}
|
run: cmake --build build --target ${{ matrix.target }}
|
||||||
|
|
||||||
ci_static_analysis_clang:
|
ci_static_analysis_clang:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
container: silkeh/clang:22
|
container: silkeh/clang:dev
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: [ci_test_clang, ci_clang_tidy, ci_test_clang_sanitizer, ci_clang_analyze, ci_single_binaries]
|
target: [ci_test_clang, ci_clang_tidy, ci_test_clang_sanitizer, ci_clang_analyze, ci_single_binaries]
|
||||||
steps:
|
steps:
|
||||||
- name: Install git, clang-tools, iwyu (ci_single_binaries), and unzip
|
- name: Install git, clang-tools, iwyu (ci_single_binaries), and unzip
|
||||||
run: apt-get update ; apt-get install -y git clang-tools iwyu unzip
|
run: apt-get update ; apt-get install -y git clang-tools iwyu unzip
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
- name: Get latest CMake and ninja
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
uses: lukka/get-cmake@28983e0d3955dba2bb0a6810caae0c6cf268ec0c # v4.0.0
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --target ${{ matrix.target }}
|
run: cmake --build build --target ${{ matrix.target }}
|
||||||
|
|
||||||
ci_cmake_options:
|
ci_cmake_options:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
container: ubuntu:24.04
|
container: ubuntu:focal
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: [ci_cmake_flags, ci_test_diagnostics, ci_test_diagnostic_positions, ci_test_noexceptions, ci_test_noimplicitconversions, ci_test_legacycomparison, ci_test_noglobaludls, ci_test_disableenumserialization, ci_test_disabletuplereferenceconversion, ci_test_skiplibraryversioncheck, ci_test_simdutf, ci_test_strict_nul_handling, ci_test_delete_deprecated_functions, ci_test_no_thread_local]
|
target: [ci_cmake_flags, ci_test_diagnostics, ci_test_diagnostic_positions, ci_test_noexceptions, ci_test_noimplicitconversions, ci_test_legacycomparison, ci_test_noglobaludls]
|
||||||
steps:
|
steps:
|
||||||
- name: Install build-essential
|
- name: Install build-essential
|
||||||
run: apt-get update ; apt-get install -y build-essential unzip wget git
|
run: apt-get update ; apt-get install -y build-essential unzip wget git libssl-dev
|
||||||
# the CMake 3.5.0 release binary that ci_cmake_flags downloads links
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
# against libidn.so.11, which Ubuntu 24.04 no longer ships
|
|
||||||
- name: Install libidn11 for CMake 3.5.0
|
|
||||||
if: matrix.target == 'ci_cmake_flags'
|
|
||||||
run: |
|
|
||||||
wget -q http://archive.ubuntu.com/ubuntu/pool/main/libi/libidn/libidn11_1.33-2.2ubuntu2_amd64.deb
|
|
||||||
dpkg -i libidn11_1.33-2.2ubuntu2_amd64.deb
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
- name: Get latest CMake and ninja
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
uses: lukka/get-cmake@28983e0d3955dba2bb0a6810caae0c6cf268ec0c # v4.0.0
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --target ${{ matrix.target }}
|
run: cmake --build build --target ${{ matrix.target }}
|
||||||
|
|
||||||
ci_test_coverage:
|
ci_test_coverage:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Install dependencies and de_DE locale
|
- name: Install dependencies and de_DE locale
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get clean
|
sudo apt-get clean
|
||||||
@@ -197,90 +115,58 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --target ci_test_coverage
|
run: cmake --build build --target ci_test_coverage
|
||||||
- name: Archive coverage report
|
- name: Archive coverage report
|
||||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: code-coverage-report
|
name: code-coverage-report
|
||||||
path: ${{ github.workspace }}/build/html
|
path: ${{ github.workspace }}/build/html
|
||||||
- name: Publish report to Coveralls
|
- name: Publish report to Coveralls
|
||||||
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8
|
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
path-to-lcov: ${{ github.workspace }}/build/json.info.filtered.noexcept
|
path-to-lcov: ${{ github.workspace }}/build/json.info.filtered.noexcept
|
||||||
fail-on-error: false
|
|
||||||
|
|
||||||
ci_test_compilers_gcc_old:
|
ci_test_compilers_gcc_old:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
compiler: ['4.8', '4.9', '5', '6']
|
compiler: ['4.8', '4.9', '5', '6']
|
||||||
# official gcc:4.8/4.9/5/6 images fail to check out code (too old for
|
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
||||||
# actions/checkout); install the old compilers on top of official ubuntu:20.04
|
|
||||||
# instead, mirroring what the (now retired) custom json-ci image did.
|
|
||||||
container: ubuntu:20.04
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install g++-${{ matrix.compiler }}
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
run: |
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y --no-install-recommends software-properties-common ca-certificates gnupg make git
|
|
||||||
# add-apt-repository resolves the PPA through the Launchpad API,
|
|
||||||
# which intermittently times out or fails the team lookup (the plain
|
|
||||||
# "deb ..." sources below never hit Launchpad and never flake).
|
|
||||||
# Retry with backoff so a transient Launchpad blip does not fail CI.
|
|
||||||
for attempt in 1 2 3 4 5; do
|
|
||||||
add-apt-repository -y ppa:ubuntu-toolchain-r/test && break
|
|
||||||
echo "::warning::add-apt-repository ppa:ubuntu-toolchain-r/test failed (attempt ${attempt}/5); retrying"
|
|
||||||
sleep $((attempt * 10))
|
|
||||||
done
|
|
||||||
apt-add-repository -y "deb http://archive.ubuntu.com/ubuntu/ bionic main"
|
|
||||||
apt-add-repository -y "deb http://archive.ubuntu.com/ubuntu/ bionic universe"
|
|
||||||
apt-add-repository -y "deb http://archive.ubuntu.com/ubuntu/ xenial main"
|
|
||||||
apt-add-repository -y "deb http://archive.ubuntu.com/ubuntu/ xenial universe"
|
|
||||||
apt-add-repository -y "deb http://archive.ubuntu.com/ubuntu/ xenial-updates main"
|
|
||||||
apt-add-repository -y "deb http://archive.ubuntu.com/ubuntu/ xenial-updates universe"
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y --no-install-recommends g++-${{ matrix.compiler }}
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: CXX=g++-${{ matrix.compiler }} cmake -S . -B build -DJSON_CI=On
|
run: CXX=g++-${{ matrix.compiler }} cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --target ci_test_compiler_g++-${{ matrix.compiler }}
|
run: cmake --build build --target ci_test_compiler_g++-${{ matrix.compiler }}
|
||||||
|
|
||||||
ci_test_compilers_gcc:
|
ci_test_compilers_gcc:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# older GCC docker images (4, 5, 6) fail to check out code
|
# older GCC docker images (4, 5, 6) fail to check out code
|
||||||
compiler: ['7', '8', '9', '10', '11', '12', '13', '14', '15', '16', 'latest']
|
compiler: ['7', '8', '9', '10', '11', '12', '13', '14', 'latest']
|
||||||
container: gcc:${{ matrix.compiler }}
|
container: gcc:${{ matrix.compiler }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
- name: Get latest CMake and ninja
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
uses: lukka/get-cmake@28983e0d3955dba2bb0a6810caae0c6cf268ec0c # v4.0.0
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --target ci_test_compiler_default
|
run: cmake --build build --target ci_test_compiler_default
|
||||||
|
|
||||||
ci_test_compilers_clang:
|
ci_test_compilers_clang:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
compiler: ['3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15-bullseye', '16', '17', '18', '19', '20', '21', '22', 'latest']
|
compiler: ['3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15-bullseye', '16', '17', '18', '19', '20', 'latest']
|
||||||
container: silkeh/clang:${{ matrix.compiler }}
|
container: silkeh/clang:${{ matrix.compiler }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- name: Install unzip and git
|
||||||
with:
|
run: apt-get update ; apt-get install -y unzip git
|
||||||
persist-credentials: false
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- name: Get latest CMake and ninja
|
- name: Get latest CMake and ninja
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
uses: lukka/get-cmake@28983e0d3955dba2bb0a6810caae0c6cf268ec0c # v4.0.0
|
||||||
- name: Disable filesystem support (std::filesystem is unusable) for clang 7 / 8 / 9 / 10
|
- name: Set env FORCE_STDCPPFS_FLAG for clang 7 / 8 / 9 / 10
|
||||||
run: echo "JSON_FORCED_GLOBAL_COMPILE_OPTIONS=-DJSON_HAS_FILESYSTEM=0;-DJSON_HAS_EXPERIMENTAL_FILESYSTEM=0" >> "$GITHUB_ENV"
|
run: echo "JSON_FORCED_GLOBAL_COMPILE_OPTIONS=-DJSON_HAS_FILESYSTEM=0;-DJSON_HAS_EXPERIMENTAL_FILESYSTEM=0" >> "$GITHUB_ENV"
|
||||||
if: ${{ matrix.compiler == '7' || matrix.compiler == '8' || matrix.compiler == '9' || matrix.compiler == '10' }}
|
if: ${{ matrix.compiler == '7' || matrix.compiler == '8' || matrix.compiler == '9' || matrix.compiler == '10' }}
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
@@ -289,24 +175,22 @@ jobs:
|
|||||||
run: cmake --build build --target ci_test_compiler_default
|
run: cmake --build build --target ci_test_compiler_default
|
||||||
|
|
||||||
ci_test_standards_gcc:
|
ci_test_standards_gcc:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
container: gcc:latest
|
container: gcc:latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
standard: [11, 14, 17, 20, 23, 26]
|
standard: [11, 14, 17, 20, 23, 26]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
- name: Get latest CMake and ninja
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
uses: lukka/get-cmake@28983e0d3955dba2bb0a6810caae0c6cf268ec0c # v4.0.0
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --target ci_test_gcc_cxx${{ matrix.standard }}
|
run: cmake --build build --target ci_test_gcc_cxx${{ matrix.standard }}
|
||||||
|
|
||||||
ci_test_standards_clang:
|
ci_test_standards_clang:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
container: silkeh/clang:latest
|
container: silkeh/clang:latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -315,11 +199,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Install git and unzip
|
- name: Install git and unzip
|
||||||
run: apt-get update ; apt-get install -y git unzip
|
run: apt-get update ; apt-get install -y git unzip
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
- name: Get latest CMake and ninja
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
uses: lukka/get-cmake@28983e0d3955dba2bb0a6810caae0c6cf268ec0c # v4.0.0
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build with libc++
|
- name: Build with libc++
|
||||||
@@ -330,164 +212,40 @@ jobs:
|
|||||||
if: ${{ matrix.stdlib == 'libstdcxx' }}
|
if: ${{ matrix.stdlib == 'libstdcxx' }}
|
||||||
|
|
||||||
ci_cuda_example:
|
ci_cuda_example:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
# 11.8.0: newest pre-C++20 CUDA release, exercises the C++17 fallback
|
|
||||||
# path (tests/cuda_example/CMakeLists.txt picks the standard per nvcc
|
|
||||||
# version); 12.1.1: permanent regression guard for #3907 (nvcc 12.0/12.1
|
|
||||||
# choke on enable_borrowed_range at C++20, fixed in 12.2); 12.6.3: recent
|
|
||||||
# CUDA/C++20 coverage.
|
|
||||||
cuda: ['11.8.0', '12.1.1', '12.6.3']
|
|
||||||
container: nvidia/cuda:${{ matrix.cuda }}-devel-ubuntu22.04
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --target ci_cuda_example
|
run: cmake --build build --target ci_cuda_example
|
||||||
|
|
||||||
ci_module_cpp20:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
container: ['gcc:latest', 'silkeh/clang:latest']
|
|
||||||
runs-on: ubuntu-26.04
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
# The module test uses `import std;`, which needs CMake's experimental
|
|
||||||
# import-std support. Its opt-in token is CMake-version-specific, so pin
|
|
||||||
# CMake to the version whose token is set in tests/module_cpp20/CMakeLists.txt.
|
|
||||||
- name: Get pinned CMake and ninja
|
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
|
||||||
with:
|
|
||||||
cmakeVersion: 4.3.4
|
|
||||||
# Clang: the std library module is provided by libc++ (the image's libstdc++
|
|
||||||
# ships none), and the image's libc++ module manifest has a broken relative
|
|
||||||
# path — repoint it at the real module sources.
|
|
||||||
- name: Use libc++ and fix its module manifest path (Clang)
|
|
||||||
if: matrix.container == 'silkeh/clang:latest'
|
|
||||||
run: |
|
|
||||||
echo "CXXFLAGS=-stdlib=libc++" >> "$GITHUB_ENV"
|
|
||||||
mkdir -p /usr/lib/share && ln -sf /usr/lib/llvm-*/share/libc++ /usr/lib/share/libc++
|
|
||||||
- name: Run CMake
|
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build build --target ci_module_cpp20
|
|
||||||
|
|
||||||
ci_icpc:
|
ci_icpc:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
# Intel discontinued the classic icc/icpc compiler in oneAPI 2024.0; this is
|
container: ghcr.io/nlohmann/json-ci:v2.2.0
|
||||||
# Intel's own last officially published image that still includes it.
|
|
||||||
container: intel/oneapi-hpckit:2023.2.1-devel-ubuntu22.04
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- name: Build
|
||||||
# No need to source setvars.sh here: unlike the old custom image, this
|
run: |
|
||||||
# official image already has the oneAPI environment (icc/icpc on PATH)
|
. /opt/intel/oneapi/setvars.sh
|
||||||
# baked in, and re-sourcing it fails with "already been run" (exit 3).
|
cmake --build build --target ci_icpc
|
||||||
run: cmake --build build --target ci_icpc
|
|
||||||
|
|
||||||
ci_icpx:
|
|
||||||
runs-on: ubuntu-26.04
|
|
||||||
container: intel/oneapi-hpckit:latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
|
||||||
- name: Run CMake
|
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build build --target ci_icpx
|
|
||||||
|
|
||||||
ci_nvhpc:
|
|
||||||
runs-on: ubuntu-26.04
|
|
||||||
container: nvcr.io/nvidia/nvhpc:25.5-devel-cuda12.9-ubuntu22.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
|
||||||
- name: Run CMake
|
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build build --target ci_nvhpc
|
|
||||||
|
|
||||||
ci_emscripten:
|
|
||||||
runs-on: ubuntu-26.04
|
|
||||||
steps:
|
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
|
||||||
with:
|
|
||||||
egress-policy: audit
|
|
||||||
|
|
||||||
- name: Install emscripten
|
|
||||||
uses: mymindstorm/setup-emsdk@4528d102f7230f0e7b276855c01ea1159be0e984 # v16
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
|
||||||
- name: Run CMake
|
|
||||||
run: cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -GNinja
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build build
|
|
||||||
|
|
||||||
ci_test_documentation:
|
ci_test_documentation:
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: [ci_test_examples, ci_test_build_documentation, ci_test_documentation_mermaid]
|
target: [ci_test_examples, ci_test_build_documentation]
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
uses: step-security/harden-runner@46b06cea07f9e64621fdf066ba77ac6915163d43 # v2.22.3
|
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
|
||||||
with:
|
with:
|
||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
# the git-revision-date-localized plugin needs the history; a shallow clone makes the strict build fail
|
|
||||||
fetch-depth: ${{ matrix.target == 'ci_test_build_documentation' && '0' || '1' }}
|
|
||||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
||||||
if: matrix.target == 'ci_test_documentation_mermaid'
|
|
||||||
with:
|
|
||||||
node-version: 24
|
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --target ${{ matrix.target }}
|
run: cmake --build build --target ${{ matrix.target }}
|
||||||
|
|
||||||
# Native Linux ARM64 runner with the latest GCC. The ubuntu-24.04-arm label is
|
|
||||||
# only available for public repositories.
|
|
||||||
ci_test_arm64:
|
|
||||||
runs-on: ubuntu-24.04-arm
|
|
||||||
container: gcc:latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
|
||||||
- name: Check that the job runs natively on arm64
|
|
||||||
run: uname -m && test "$(uname -m)" = aarch64
|
|
||||||
- name: Run CMake
|
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build build --target ci_test_compiler_default
|
|
||||||
+69
-163
@@ -18,17 +18,15 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
mingw:
|
mingw:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2019
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
architecture: [x64, x86]
|
architecture: [x64, x86]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Set up MinGW
|
- name: Set up MinGW
|
||||||
uses: egor-tensin/setup-mingw@d54f5ef0ce585bd3fbb1f8a71b5b254f59dbf931 # v3.0
|
uses: egor-tensin/setup-mingw@84c781b557efd538dec66bde06988d81cd3138cf # v2.2.0
|
||||||
with:
|
with:
|
||||||
platform: ${{ matrix.architecture }}
|
platform: ${{ matrix.architecture }}
|
||||||
version: 12.2.0 # https://github.com/egor-tensin/setup-mingw/issues/14
|
version: 12.2.0 # https://github.com/egor-tensin/setup-mingw/issues/14
|
||||||
@@ -39,190 +37,98 @@ jobs:
|
|||||||
- name: Test
|
- name: Test
|
||||||
run: cd build ; ctest -j 10 -C Debug --output-on-failure
|
run: cd build ; ctest -j 10 -C Debug --output-on-failure
|
||||||
|
|
||||||
msvc:
|
msvc2019:
|
||||||
|
runs-on: windows-2019
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
build_type: [Debug, Release]
|
build_type: [Debug, Release]
|
||||||
architecture: [Win32, x64]
|
architecture: [Win32, x64]
|
||||||
std_version: [default, latest]
|
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
- name: Run CMake
|
||||||
|
run: cmake -S . -B build -G "Visual Studio 16 2019" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/W4 /WX"
|
||||||
|
if: matrix.build_type == 'Release'
|
||||||
|
- name: Run CMake
|
||||||
|
run: cmake -S . -B build -G "Visual Studio 16 2019" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="/W4 /WX"
|
||||||
|
if: matrix.build_type == 'Debug'
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build --config ${{ matrix.build_type }} --parallel 10
|
||||||
|
- name: Test
|
||||||
|
run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure
|
||||||
|
|
||||||
|
msvc2019_latest:
|
||||||
|
runs-on: windows-2019
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
- name: Run CMake
|
||||||
|
run: cmake -S . -B build -G "Visual Studio 16 2019" -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /W4 /WX"
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build --config Release --parallel 10
|
||||||
|
- name: Test
|
||||||
|
run: cd build ; ctest -j 10 -C Release --output-on-failure
|
||||||
|
|
||||||
|
msvc2022:
|
||||||
|
runs-on: windows-2022
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
build_type: [Debug, Release]
|
||||||
|
architecture: [Win32, x64]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
- name: Run CMake
|
||||||
|
run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/W4 /WX"
|
||||||
|
if: matrix.build_type == 'Release'
|
||||||
|
- name: Run CMake
|
||||||
|
run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="/W4 /WX"
|
||||||
|
if: matrix.build_type == 'Debug'
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build --config ${{ matrix.build_type }} --parallel 10
|
||||||
|
- name: Test
|
||||||
|
run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure
|
||||||
|
|
||||||
|
msvc2022_latest:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
- name: Run CMake
|
||||||
persist-credentials: false
|
run: cmake -S . -B build -G "Visual Studio 17 2022" -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /W4 /WX"
|
||||||
- name: Set extra CXX_FLAGS for latest std_version
|
- name: Build
|
||||||
id: cxxflags
|
run: cmake --build build --config Release --parallel 10
|
||||||
run: |
|
- name: Test
|
||||||
if [ "${{ matrix.std_version }}" = "latest" ]; then
|
run: cd build ; ctest -j 10 -C Release --output-on-failure
|
||||||
echo "flags=/permissive- /std:c++latest /utf-8 /W4 /WX" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "flags=/W4 /WX" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
shell: bash
|
|
||||||
- name: Run CMake (Release)
|
|
||||||
run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="$env:flags"
|
|
||||||
if: matrix.build_type == 'Release'
|
|
||||||
shell: pwsh
|
|
||||||
- name: Run CMake (Debug)
|
|
||||||
run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="$env:flags"
|
|
||||||
if: matrix.build_type == 'Debug'
|
|
||||||
shell: pwsh
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build build --config ${{ matrix.build_type }} --parallel 10
|
|
||||||
- name: Test
|
|
||||||
run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure
|
|
||||||
|
|
||||||
# Visual Studio 2026 (v145 toolset) on the windows-2025 image. The "Visual Studio
|
|
||||||
# 18 2026" generator requires CMake 4.2+, so a recent CMake is fetched explicitly.
|
|
||||||
msvc-vs2026:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
build_type: [Debug, Release]
|
|
||||||
architecture: [Win32, x64]
|
|
||||||
std_version: [default, latest]
|
|
||||||
|
|
||||||
runs-on: windows-2025
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Get latest CMake and ninja
|
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
|
||||||
- name: Set extra CXX_FLAGS for latest std_version
|
|
||||||
# /wd5285 silences C5285 emitted by the bundled third-party doctest.h, which
|
|
||||||
# specializes std::tuple (newly diagnosed by the VS2026 v145 toolset)
|
|
||||||
run: |
|
|
||||||
if [ "${{ matrix.std_version }}" = "latest" ]; then
|
|
||||||
echo "flags=/permissive- /std:c++latest /utf-8 /W4 /WX /wd5285" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "flags=/W4 /WX /wd5285" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
shell: bash
|
|
||||||
- name: Run CMake (Release)
|
|
||||||
run: cmake -S . -B build -G "Visual Studio 18 2026" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="$env:flags"
|
|
||||||
if: matrix.build_type == 'Release'
|
|
||||||
shell: pwsh
|
|
||||||
- name: Run CMake (Debug)
|
|
||||||
run: cmake -S . -B build -G "Visual Studio 18 2026" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="$env:flags"
|
|
||||||
if: matrix.build_type == 'Debug'
|
|
||||||
shell: pwsh
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build build --config ${{ matrix.build_type }} --parallel 10
|
|
||||||
- name: Test
|
|
||||||
run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure
|
|
||||||
|
|
||||||
# Native ARM64 Windows runner with the MSVC ARM64 toolset. The windows-11-arm
|
|
||||||
# label is only available for public repositories.
|
|
||||||
msvc-arm64:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
build_type: [Debug, Release]
|
|
||||||
|
|
||||||
runs-on: windows-11-arm
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Run CMake (Release)
|
|
||||||
run: cmake -S . -B build -G "Visual Studio 18 2026" -A ARM64 -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/W4 /WX"
|
|
||||||
if: matrix.build_type == 'Release'
|
|
||||||
shell: pwsh
|
|
||||||
- name: Run CMake (Debug)
|
|
||||||
run: cmake -S . -B build -G "Visual Studio 18 2026" -A ARM64 -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="/W4 /WX"
|
|
||||||
if: matrix.build_type == 'Debug'
|
|
||||||
shell: pwsh
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build build --config ${{ matrix.build_type }} --parallel 10
|
|
||||||
- name: Test
|
|
||||||
run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure
|
|
||||||
|
|
||||||
clang:
|
clang:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2019
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
version: [11.0.1, 12.0.1, 13.0.1, 14.0.6, 15.0.7, 16.0.6, 18.1.8, 19.1.7, 20.1.8]
|
version: [11, 12, 13, 14, 15]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Install Clang
|
- name: Install Clang
|
||||||
run: curl -fsSL -o LLVM${{ matrix.version }}.exe https://github.com/llvm/llvm-project/releases/download/llvmorg-${{ matrix.version }}/LLVM-${{ matrix.version }}-win64.exe ; 7z x LLVM${{ matrix.version }}.exe -y -o"C:/Program Files/LLVM"
|
run: curl -fsSL -o LLVM${{ matrix.version }}.exe https://github.com/llvm/llvm-project/releases/download/llvmorg-${{ matrix.version }}.0.0/LLVM-${{ matrix.version }}.0.0-win64.exe ; 7z x LLVM${{ matrix.version }}.exe -y -o"C:/Program Files/LLVM"
|
||||||
- name: Set up MinGW
|
|
||||||
uses: egor-tensin/setup-mingw@d54f5ef0ce585bd3fbb1f8a71b5b254f59dbf931 # v3.0
|
|
||||||
with:
|
|
||||||
platform: x64
|
|
||||||
version: 12.2.0 # https://github.com/egor-tensin/setup-mingw/issues/14
|
|
||||||
# CMAKE_CXX_FLAGS_DEBUG is overridden to drop the default -g: linking
|
|
||||||
# test-regression2_cpp20 intermittently fails with "relocation truncated
|
|
||||||
# to fit: IMAGE_REL_AMD64_SECREL against `.debug_line'" because the
|
|
||||||
# MinGW linker cannot relocate the debug sections this test produces.
|
|
||||||
# The tests are only built and run here, so the debug info is not used.
|
|
||||||
# Do not add -O1 here to shrink the objects further: it does make them
|
|
||||||
# link, but the binaries clang 11.0.1 and clang 18.1.8 then produce crash
|
|
||||||
# before doctest prints its first line - 39 of 102 tests on clang 18.
|
|
||||||
# Keep the objects small by splitting the test files instead.
|
|
||||||
# The tests link with LLD: GNU ld fails on objects with more than 32767
|
|
||||||
# sections with "relocation truncated to fit: IMAGE_REL_AMD64_REL32
|
|
||||||
# against `.rdata'", as it stores the section an associative COMDAT
|
|
||||||
# section belongs to in 16 bits (x_associated in binutils'
|
|
||||||
# include/coff/internal.h) and so discards the jump tables of inline
|
|
||||||
# functions together with the wrong function. Each basic_json
|
|
||||||
# specialization and input type a test file instantiates adds many
|
|
||||||
# sections, so unit-msgpack.cpp and unit-regression2.cpp kept crossing
|
|
||||||
# that limit as the library grew.
|
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build ^
|
run: cmake -S . -B build -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On
|
||||||
-DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" ^
|
|
||||||
-DCMAKE_CXX_FLAGS="--target=x86_64-w64-mingw32 -stdlib=libstdc++ -pthread" ^
|
|
||||||
-DCMAKE_CXX_FLAGS_DEBUG="-g0" ^
|
|
||||||
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld -lwinpthread" ^
|
|
||||||
-G"MinGW Makefiles" ^
|
|
||||||
-DCMAKE_BUILD_TYPE=Debug ^
|
|
||||||
-DJSON_BuildTests=On
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --parallel 10
|
run: cmake --build build --parallel 10
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cd build ; ctest -j 10 -C Debug --output-on-failure
|
run: cd build ; ctest -j 10 -C Debug --exclude-regex "test-unicode" --output-on-failure
|
||||||
|
|
||||||
clang-cl:
|
clang-cl-11:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2019
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
architecture: [Win32, x64]
|
architecture: [Win32, x64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -T ClangCL -DJSON_BuildTests=On
|
run: cmake -S . -B build -G "Visual Studio 16 2019" -A ${{ matrix.architecture }} -T ClangCL -DJSON_BuildTests=On
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --config Debug --parallel 10
|
run: cmake --build build --config Debug --parallel 10
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cd build ; ctest -j 10 -C Debug --output-on-failure
|
run: cd build ; ctest -j 10 -C Debug --exclude-regex "test-unicode" --output-on-failure
|
||||||
|
|
||||||
ci_module_cpp20:
|
|
||||||
runs-on: windows-2022
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
# The module test uses `import std;`, which needs CMake's experimental
|
|
||||||
# import-std support. Its opt-in token is CMake-version-specific, so pin
|
|
||||||
# CMake to the version whose token is set in tests/module_cpp20/CMakeLists.txt.
|
|
||||||
- name: Get pinned CMake and ninja
|
|
||||||
uses: lukka/get-cmake@f86dd60acae0d132056913e248bdabf0e0580b7a # v4.4.5
|
|
||||||
with:
|
|
||||||
cmakeVersion: 4.3.4
|
|
||||||
# CMAKE_CXX_FLAGS replaces CMake's MSVC defaults (which include /EHsc), and
|
|
||||||
# ci_module_cpp20 forwards it to the module build, so list /EHsc explicitly
|
|
||||||
- name: Run CMake (Debug)
|
|
||||||
run: cmake -S . -B build -G "Visual Studio 17 2022" -DJSON_CI=ON -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /EHsc /W4 /WX"
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build build --config Debug --target ci_module_cpp20
|
|
||||||
|
|
||||||
+1
-19
@@ -27,8 +27,7 @@
|
|||||||
/docs/docset/JSON_for_Modern_C++.tgz
|
/docs/docset/JSON_for_Modern_C++.tgz
|
||||||
/docs/docset/docSet.dsidx
|
/docs/docset/docSet.dsidx
|
||||||
/docs/mkdocs/.cache/
|
/docs/mkdocs/.cache/
|
||||||
/docs/mkdocs/hooks/__pycache__/
|
/docs/mkdocs/docs/__pycache__/
|
||||||
/docs/mkdocs/scripts/mermaid/node_modules/
|
|
||||||
/docs/mkdocs/site/
|
/docs/mkdocs/site/
|
||||||
/docs/mkdocs/venv/
|
/docs/mkdocs/venv/
|
||||||
|
|
||||||
@@ -46,20 +45,3 @@ nlohmann_json.spdx
|
|||||||
|
|
||||||
# Bazel-related
|
# Bazel-related
|
||||||
MODULE.bazel.lock
|
MODULE.bazel.lock
|
||||||
|
|
||||||
# backups left by `make check-amalgamation` or the ci_test_amalgamation target if they are interrupted
|
|
||||||
/BUILD.bazel~
|
|
||||||
/nlohmann_json.natvis~
|
|
||||||
/single_include/nlohmann/*.hpp~
|
|
||||||
/venv_astyle/
|
|
||||||
|
|
||||||
# release outputs of `make release`
|
|
||||||
/include.zip
|
|
||||||
/include.zip.asc
|
|
||||||
/json.tar.xz
|
|
||||||
/json.tar.xz.asc
|
|
||||||
/release_files/
|
|
||||||
/single_include/nlohmann/*.asc
|
|
||||||
|
|
||||||
# GCC module cache
|
|
||||||
/gcm.cache/
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"_comment": "Used by the ci_infer CMake target (#5715 item 4b). fail-on-issue makes CI fail on Infer findings; disable-issue-type is a type-level baseline for the ~174 pre-existing findings (all PULSE_UNNECESSARY_COPY*/PULSE_RESOURCE_LEAK/PULSE_CONST_REFABLE, mostly in test code) triaged in run https://github.com/nlohmann/json/actions/runs/35829411620 on commit 1054b2097, so CI fails only on a NEW issue type. Remove an entry here once its findings have been fixed or explicitly accepted.",
|
|
||||||
"_comment_pulse": "Pulse stops exploring paths after pulse-max-disjuncts (default 20). With the default, basic_json::replace_value() (destroy + assert_invariant) exceeds the limit, Pulse loses the stored type, and reports false NULLPTR_DEREFERENCE findings for get_ptr() results in tests/src/unit-pointer_access.cpp.",
|
|
||||||
"_comment_view": "Infer's model of std::unique_ptr mixes up values that are returned by value and own one: basic_json_document (parse() results) and the `built` values of the build() helper in tests/src/unit-json_view_builder.cpp. It reports USE_AFTER_DELETE for one of them after the destructor of an unrelated object (e.g. ~built() on line 345 invalidating `shallow` on line 350 of that file, or two documents parsed in one lambda in tests/src/unit-json_view_dump.cpp). AddressSanitizer and Valgrind are clean on the same tests, so reports for the json_view test files are excluded; findings reported in the library headers are still reported.",
|
|
||||||
"pulse-max-disjuncts": 40,
|
|
||||||
"fail-on-issue": true,
|
|
||||||
"disable-issue-type": [
|
|
||||||
"PULSE_UNNECESSARY_COPY_ASSIGNMENT",
|
|
||||||
"PULSE_UNNECESSARY_COPY",
|
|
||||||
"PULSE_UNNECESSARY_COPY_INTERMEDIATE",
|
|
||||||
"PULSE_UNNECESSARY_COPY_OPTIONAL",
|
|
||||||
"PULSE_RESOURCE_LEAK",
|
|
||||||
"PULSE_CONST_REFABLE"
|
|
||||||
],
|
|
||||||
"report-block-list-path-regex": [
|
|
||||||
"tests/src/unit-json_view.*\\.cpp"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: json
|
||||||
|
Upstream-Contact: Niels Lohmann <mail@nlohmann.me>
|
||||||
|
Source: https://github.com/nlohmann/json
|
||||||
|
|
||||||
|
Files: *
|
||||||
|
Copyright: 2013-2025 Niels Lohmann <https://nlohmann.me>
|
||||||
|
License: MIT
|
||||||
|
|
||||||
|
Files: include/nlohmann/thirdparty/hedley.hpp
|
||||||
|
Copyright: 2016-2021 Evan Nemerson <evan@nemerson.com>
|
||||||
|
License: CC0
|
||||||
|
|
||||||
|
Files: tests/thirdparty/doctest/*
|
||||||
|
Copyright: 2016-2023 Viktor Kirilov
|
||||||
|
License: MIT
|
||||||
|
|
||||||
|
Files: tests/thirdparty/fifo_map/*
|
||||||
|
Copyright: 2015-2017 Niels Lohmann
|
||||||
|
License: MIT
|
||||||
|
|
||||||
|
Files: tests/thirdparty/Fuzzer/*
|
||||||
|
Copyright: 2003-2022 LLVM Project.
|
||||||
|
License: Apache-2.0
|
||||||
|
|
||||||
|
Files: tests/thirdparty/imapdl/*
|
||||||
|
Copyright: 2017 Georg Sauthoff <mail@gms.tf>
|
||||||
|
License: GPL-3.0-only
|
||||||
|
|
||||||
|
Files: tools/amalgamate/*
|
||||||
|
Copyright: 2012 Erik Edlund <erik.edlund@32767.se>
|
||||||
|
License: BSD-3-Clause
|
||||||
|
|
||||||
|
Files: tools/gdb_pretty_printer/*
|
||||||
|
Copyright: 2020 Hannes Domani <https://github.com/ssbssa>
|
||||||
|
License: MIT
|
||||||
+1
-38
@@ -20,26 +20,18 @@ cc_library(
|
|||||||
hdrs = [
|
hdrs = [
|
||||||
"include/nlohmann/adl_serializer.hpp",
|
"include/nlohmann/adl_serializer.hpp",
|
||||||
"include/nlohmann/byte_container_with_subtype.hpp",
|
"include/nlohmann/byte_container_with_subtype.hpp",
|
||||||
"include/nlohmann/detail/abi_config.hpp",
|
|
||||||
"include/nlohmann/detail/abi_macros.hpp",
|
"include/nlohmann/detail/abi_macros.hpp",
|
||||||
"include/nlohmann/detail/bit_ops.hpp",
|
|
||||||
"include/nlohmann/detail/conversions/from_json.hpp",
|
"include/nlohmann/detail/conversions/from_json.hpp",
|
||||||
"include/nlohmann/detail/conversions/to_chars.hpp",
|
"include/nlohmann/detail/conversions/to_chars.hpp",
|
||||||
"include/nlohmann/detail/conversions/to_json.hpp",
|
"include/nlohmann/detail/conversions/to_json.hpp",
|
||||||
"include/nlohmann/detail/conversions/zmij.hpp",
|
|
||||||
"include/nlohmann/detail/exceptions.hpp",
|
"include/nlohmann/detail/exceptions.hpp",
|
||||||
"include/nlohmann/detail/hash.hpp",
|
"include/nlohmann/detail/hash.hpp",
|
||||||
"include/nlohmann/detail/input/binary_reader.hpp",
|
"include/nlohmann/detail/input/binary_reader.hpp",
|
||||||
"include/nlohmann/detail/input/contiguous_parser.hpp",
|
|
||||||
"include/nlohmann/detail/input/input_adapters.hpp",
|
"include/nlohmann/detail/input/input_adapters.hpp",
|
||||||
"include/nlohmann/detail/input/json_sax.hpp",
|
"include/nlohmann/detail/input/json_sax.hpp",
|
||||||
"include/nlohmann/detail/input/lexer.hpp",
|
"include/nlohmann/detail/input/lexer.hpp",
|
||||||
"include/nlohmann/detail/input/number_parse.hpp",
|
|
||||||
"include/nlohmann/detail/input/parser.hpp",
|
"include/nlohmann/detail/input/parser.hpp",
|
||||||
"include/nlohmann/detail/input/position_t.hpp",
|
"include/nlohmann/detail/input/position_t.hpp",
|
||||||
"include/nlohmann/detail/input/pow5_table.hpp",
|
|
||||||
"include/nlohmann/detail/input/simd_scan.hpp",
|
|
||||||
"include/nlohmann/detail/input/string_scan.hpp",
|
|
||||||
"include/nlohmann/detail/iterators/internal_iterator.hpp",
|
"include/nlohmann/detail/iterators/internal_iterator.hpp",
|
||||||
"include/nlohmann/detail/iterators/iter_impl.hpp",
|
"include/nlohmann/detail/iterators/iter_impl.hpp",
|
||||||
"include/nlohmann/detail/iterators/iteration_proxy.hpp",
|
"include/nlohmann/detail/iterators/iteration_proxy.hpp",
|
||||||
@@ -61,56 +53,27 @@ cc_library(
|
|||||||
"include/nlohmann/detail/meta/type_traits.hpp",
|
"include/nlohmann/detail/meta/type_traits.hpp",
|
||||||
"include/nlohmann/detail/meta/void_t.hpp",
|
"include/nlohmann/detail/meta/void_t.hpp",
|
||||||
"include/nlohmann/detail/output/binary_writer.hpp",
|
"include/nlohmann/detail/output/binary_writer.hpp",
|
||||||
"include/nlohmann/detail/output/error_handler.hpp",
|
|
||||||
"include/nlohmann/detail/output/output_adapters.hpp",
|
"include/nlohmann/detail/output/output_adapters.hpp",
|
||||||
"include/nlohmann/detail/output/serializer.hpp",
|
"include/nlohmann/detail/output/serializer.hpp",
|
||||||
"include/nlohmann/detail/recursion_depth_limit.hpp",
|
|
||||||
"include/nlohmann/detail/string_concat.hpp",
|
"include/nlohmann/detail/string_concat.hpp",
|
||||||
"include/nlohmann/detail/string_escape.hpp",
|
"include/nlohmann/detail/string_escape.hpp",
|
||||||
"include/nlohmann/detail/string_utils.hpp",
|
"include/nlohmann/detail/string_utils.hpp",
|
||||||
"include/nlohmann/detail/value_t.hpp",
|
"include/nlohmann/detail/value_t.hpp",
|
||||||
"include/nlohmann/detail/view/builder.hpp",
|
|
||||||
"include/nlohmann/detail/view/compare.hpp",
|
|
||||||
"include/nlohmann/detail/view/document_data.hpp",
|
|
||||||
"include/nlohmann/detail/view/edit.hpp",
|
|
||||||
"include/nlohmann/detail/view/edit_storage.hpp",
|
|
||||||
"include/nlohmann/detail/view/errors.hpp",
|
|
||||||
"include/nlohmann/detail/view/image.hpp",
|
|
||||||
"include/nlohmann/detail/view/input.hpp",
|
|
||||||
"include/nlohmann/detail/view/iterator.hpp",
|
|
||||||
"include/nlohmann/detail/view/lookup.hpp",
|
|
||||||
"include/nlohmann/detail/view/macro_scope.hpp",
|
|
||||||
"include/nlohmann/detail/view/macro_unscope.hpp",
|
|
||||||
"include/nlohmann/detail/view/materialize.hpp",
|
|
||||||
"include/nlohmann/detail/view/node.hpp",
|
|
||||||
"include/nlohmann/detail/view/number.hpp",
|
|
||||||
"include/nlohmann/detail/view/object_index.hpp",
|
|
||||||
"include/nlohmann/detail/view/pointer.hpp",
|
|
||||||
"include/nlohmann/detail/view/scan.hpp",
|
|
||||||
"include/nlohmann/detail/view/serializer.hpp",
|
|
||||||
"include/nlohmann/detail/view/simd.hpp",
|
|
||||||
"include/nlohmann/detail/view/string_ref.hpp",
|
|
||||||
"include/nlohmann/detail/view/value.hpp",
|
|
||||||
"include/nlohmann/detail/view/view_mode.hpp",
|
|
||||||
"include/nlohmann/json.hpp",
|
"include/nlohmann/json.hpp",
|
||||||
"include/nlohmann/json_fwd.hpp",
|
"include/nlohmann/json_fwd.hpp",
|
||||||
"include/nlohmann/json_literals.hpp",
|
|
||||||
"include/nlohmann/json_view.hpp",
|
|
||||||
"include/nlohmann/ordered_map.hpp",
|
"include/nlohmann/ordered_map.hpp",
|
||||||
"include/nlohmann/thirdparty/hedley/hedley.hpp",
|
"include/nlohmann/thirdparty/hedley/hedley.hpp",
|
||||||
"include/nlohmann/thirdparty/hedley/hedley_undef.hpp",
|
"include/nlohmann/thirdparty/hedley/hedley_undef.hpp",
|
||||||
],
|
],
|
||||||
includes = ["include"],
|
includes = ["include"],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
|
alwayslink = True,
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "singleheader-json",
|
name = "singleheader-json",
|
||||||
hdrs = [
|
hdrs = [
|
||||||
"single_include/nlohmann/json.hpp",
|
"single_include/nlohmann/json.hpp",
|
||||||
"single_include/nlohmann/json_fwd.hpp",
|
|
||||||
"single_include/nlohmann/json_literals.hpp",
|
|
||||||
"single_include/nlohmann/json_view.hpp",
|
|
||||||
],
|
],
|
||||||
includes = ["single_include"],
|
includes = ["single_include"],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
|
|||||||
+2
-2
@@ -8,7 +8,7 @@ authors:
|
|||||||
website: https://nlohmann.me
|
website: https://nlohmann.me
|
||||||
title: "JSON for Modern C++"
|
title: "JSON for Modern C++"
|
||||||
version: 3.12.0
|
version: 3.12.0
|
||||||
date-released: 2025-04-11
|
date-released: 2025-04-07
|
||||||
license: MIT
|
license: MIT
|
||||||
repository-code: "https://github.com/nlohmann/json"
|
repository-code: "https://github.com/nlohmann"
|
||||||
url: https://json.nlohmann.me
|
url: https://json.nlohmann.me
|
||||||
+13
-85
@@ -20,33 +20,19 @@ endif()
|
|||||||
##
|
##
|
||||||
##
|
##
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
||||||
|
include(ExternalProject)
|
||||||
|
|
||||||
|
##
|
||||||
|
## OPTIONS
|
||||||
|
##
|
||||||
|
|
||||||
if (POLICY CMP0077)
|
if (POLICY CMP0077)
|
||||||
# Allow CMake 3.13+ to override options when using FetchContent / add_subdirectory.
|
# Allow CMake 3.13+ to override options when using FetchContent / add_subdirectory.
|
||||||
cmake_policy(SET CMP0077 NEW)
|
cmake_policy(SET CMP0077 NEW)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# ---- C++ Modules Support (optional) ----
|
# VERSION_GREATER_EQUAL is not available in CMake 3.1
|
||||||
option(NLOHMANN_JSON_BUILD_MODULES "Build C++ modules support" OFF)
|
if(${MAIN_PROJECT} AND (${CMAKE_VERSION} VERSION_EQUAL 3.13 OR ${CMAKE_VERSION} VERSION_GREATER 3.13))
|
||||||
|
|
||||||
if(NLOHMANN_JSON_BUILD_MODULES)
|
|
||||||
if(NOT CMAKE_VERSION VERSION_LESS 3.28)
|
|
||||||
message(STATUS "Building nlohmann.json C++ module")
|
|
||||||
add_subdirectory(src/modules)
|
|
||||||
else()
|
|
||||||
message(WARNING "Skipping nlohmann.json C++ module (requires CMake 3.28+, found ${CMAKE_VERSION})")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
##
|
|
||||||
## OPTIONS
|
|
||||||
##
|
|
||||||
|
|
||||||
# Build the tests by default only for the main project and only if the tests
|
|
||||||
# directory exists (the release archive json.tar.xz does not contain it).
|
|
||||||
# VERSION_GREATER_EQUAL is not available in older CMake (< 3.7)
|
|
||||||
if(${MAIN_PROJECT} AND (${CMAKE_VERSION} VERSION_EQUAL 3.13 OR ${CMAKE_VERSION} VERSION_GREATER 3.13)
|
|
||||||
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/CMakeLists.txt")
|
|
||||||
set(JSON_BuildTests_INIT ON)
|
set(JSON_BuildTests_INIT ON)
|
||||||
else()
|
else()
|
||||||
set(JSON_BuildTests_INIT OFF)
|
set(JSON_BuildTests_INIT OFF)
|
||||||
@@ -58,14 +44,10 @@ option(JSON_Diagnostic_Positions "Enable diagnostic positions." OFF)
|
|||||||
option(JSON_GlobalUDLs "Place user-defined string literals in the global namespace." ON)
|
option(JSON_GlobalUDLs "Place user-defined string literals in the global namespace." ON)
|
||||||
option(JSON_ImplicitConversions "Enable implicit conversions." ON)
|
option(JSON_ImplicitConversions "Enable implicit conversions." ON)
|
||||||
option(JSON_DisableEnumSerialization "Disable default integer enum serialization." OFF)
|
option(JSON_DisableEnumSerialization "Disable default integer enum serialization." OFF)
|
||||||
option(JSON_DisableTupleReferenceConversion "Disable conversion from a one-element tuple of a JSON reference." OFF)
|
|
||||||
option(JSON_LegacyDiscardedValueComparison "Enable legacy discarded value comparison." OFF)
|
option(JSON_LegacyDiscardedValueComparison "Enable legacy discarded value comparison." OFF)
|
||||||
option(JSON_Install "Install CMake targets during install step." ${MAIN_PROJECT})
|
option(JSON_Install "Install CMake targets during install step." ${MAIN_PROJECT})
|
||||||
option(JSON_MultipleHeaders "Use non-amalgamated version of the library." ON)
|
option(JSON_MultipleHeaders "Use non-amalgamated version of the library." ON)
|
||||||
option(JSON_SystemInclude "Include as system headers (skip for clang-tidy)." OFF)
|
option(JSON_SystemInclude "Include as system headers (skip for clang-tidy)." OFF)
|
||||||
option(JSON_StrictNulHandling "Build with strict NUL-byte handling enabled." OFF)
|
|
||||||
option(JSON_StrictBinaryUTF8 "Build with UTF-8 checks in the CBOR, UBJSON, BJData, and BSON writers enabled." OFF)
|
|
||||||
option(JSON_DeleteDeprecatedFunctions "Delete the deprecated functions instead of only deprecating them." OFF)
|
|
||||||
|
|
||||||
if (JSON_CI)
|
if (JSON_CI)
|
||||||
include(ci)
|
include(ci)
|
||||||
@@ -104,11 +86,7 @@ if (NOT JSON_ImplicitConversions)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (JSON_DisableEnumSerialization)
|
if (JSON_DisableEnumSerialization)
|
||||||
message(STATUS "Enum integer serialization is disabled (JSON_DISABLE_ENUM_SERIALIZATION=1)")
|
message(STATUS "Enum integer serialization is disabled (JSON_DISABLE_ENUM_SERIALIZATION=0)")
|
||||||
endif()
|
|
||||||
|
|
||||||
if (JSON_DisableTupleReferenceConversion)
|
|
||||||
message(STATUS "Tuple reference conversion is disabled (JSON_DISABLE_TUPLE_REFERENCE_CONVERSION=1)")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (JSON_LegacyDiscardedValueComparison)
|
if (JSON_LegacyDiscardedValueComparison)
|
||||||
@@ -119,18 +97,6 @@ if (JSON_Diagnostics)
|
|||||||
message(STATUS "Diagnostics enabled (JSON_DIAGNOSTICS=1)")
|
message(STATUS "Diagnostics enabled (JSON_DIAGNOSTICS=1)")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (JSON_StrictNulHandling)
|
|
||||||
message(STATUS "Strict NUL-byte handling enabled (JSON_STRICT_NUL_HANDLING=1)")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (JSON_StrictBinaryUTF8)
|
|
||||||
message(STATUS "Strict UTF-8 checks in binary writers enabled (JSON_STRICT_BINARY_UTF8=1)")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (JSON_DeleteDeprecatedFunctions)
|
|
||||||
message(STATUS "Deprecated functions are deleted (JSON_DELETE_DEPRECATED_FUNCTIONS=1)")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (JSON_Diagnostic_Positions)
|
if (JSON_Diagnostic_Positions)
|
||||||
message(STATUS "Diagnostic positions enabled (JSON_DIAGNOSTIC_POSITIONS=1)")
|
message(STATUS "Diagnostic positions enabled (JSON_DIAGNOSTIC_POSITIONS=1)")
|
||||||
endif()
|
endif()
|
||||||
@@ -161,13 +127,9 @@ target_compile_definitions(
|
|||||||
$<$<NOT:$<BOOL:${JSON_GlobalUDLs}>>:JSON_USE_GLOBAL_UDLS=0>
|
$<$<NOT:$<BOOL:${JSON_GlobalUDLs}>>:JSON_USE_GLOBAL_UDLS=0>
|
||||||
$<$<NOT:$<BOOL:${JSON_ImplicitConversions}>>:JSON_USE_IMPLICIT_CONVERSIONS=0>
|
$<$<NOT:$<BOOL:${JSON_ImplicitConversions}>>:JSON_USE_IMPLICIT_CONVERSIONS=0>
|
||||||
$<$<BOOL:${JSON_DisableEnumSerialization}>:JSON_DISABLE_ENUM_SERIALIZATION=1>
|
$<$<BOOL:${JSON_DisableEnumSerialization}>:JSON_DISABLE_ENUM_SERIALIZATION=1>
|
||||||
$<$<BOOL:${JSON_DisableTupleReferenceConversion}>:JSON_DISABLE_TUPLE_REFERENCE_CONVERSION=1>
|
|
||||||
$<$<BOOL:${JSON_Diagnostics}>:JSON_DIAGNOSTICS=1>
|
$<$<BOOL:${JSON_Diagnostics}>:JSON_DIAGNOSTICS=1>
|
||||||
$<$<BOOL:${JSON_Diagnostic_Positions}>:JSON_DIAGNOSTIC_POSITIONS=1>
|
$<$<BOOL:${JSON_Diagnostic_Positions}>:JSON_DIAGNOSTIC_POSITIONS=1>
|
||||||
$<$<BOOL:${JSON_LegacyDiscardedValueComparison}>:JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON=1>
|
$<$<BOOL:${JSON_LegacyDiscardedValueComparison}>:JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON=1>
|
||||||
$<$<BOOL:${JSON_StrictNulHandling}>:JSON_STRICT_NUL_HANDLING=1>
|
|
||||||
$<$<BOOL:${JSON_StrictBinaryUTF8}>:JSON_STRICT_BINARY_UTF8=1>
|
|
||||||
$<$<BOOL:${JSON_DeleteDeprecatedFunctions}>:JSON_DELETE_DEPRECATED_FUNCTIONS=1>
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
@@ -189,40 +151,8 @@ if (MSVC)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Install a pkg-config file, so other tools can find this. It carries the same
|
# Install a pkg-config file, so other tools can find this.
|
||||||
# compile definitions as the target above.
|
CONFIGURE_FILE(
|
||||||
set(NLOHMANN_JSON_PKGCONFIG_CFLAGS "")
|
|
||||||
if (NOT JSON_GlobalUDLs)
|
|
||||||
string(APPEND NLOHMANN_JSON_PKGCONFIG_CFLAGS " -DJSON_USE_GLOBAL_UDLS=0")
|
|
||||||
endif()
|
|
||||||
if (NOT JSON_ImplicitConversions)
|
|
||||||
string(APPEND NLOHMANN_JSON_PKGCONFIG_CFLAGS " -DJSON_USE_IMPLICIT_CONVERSIONS=0")
|
|
||||||
endif()
|
|
||||||
if (JSON_DisableEnumSerialization)
|
|
||||||
string(APPEND NLOHMANN_JSON_PKGCONFIG_CFLAGS " -DJSON_DISABLE_ENUM_SERIALIZATION=1")
|
|
||||||
endif()
|
|
||||||
if (JSON_DisableTupleReferenceConversion)
|
|
||||||
string(APPEND NLOHMANN_JSON_PKGCONFIG_CFLAGS " -DJSON_DISABLE_TUPLE_REFERENCE_CONVERSION=1")
|
|
||||||
endif()
|
|
||||||
if (JSON_Diagnostics)
|
|
||||||
string(APPEND NLOHMANN_JSON_PKGCONFIG_CFLAGS " -DJSON_DIAGNOSTICS=1")
|
|
||||||
endif()
|
|
||||||
if (JSON_Diagnostic_Positions)
|
|
||||||
string(APPEND NLOHMANN_JSON_PKGCONFIG_CFLAGS " -DJSON_DIAGNOSTIC_POSITIONS=1")
|
|
||||||
endif()
|
|
||||||
if (JSON_LegacyDiscardedValueComparison)
|
|
||||||
string(APPEND NLOHMANN_JSON_PKGCONFIG_CFLAGS " -DJSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON=1")
|
|
||||||
endif()
|
|
||||||
if (JSON_StrictNulHandling)
|
|
||||||
string(APPEND NLOHMANN_JSON_PKGCONFIG_CFLAGS " -DJSON_STRICT_NUL_HANDLING=1")
|
|
||||||
endif()
|
|
||||||
if (JSON_StrictBinaryUTF8)
|
|
||||||
string(APPEND NLOHMANN_JSON_PKGCONFIG_CFLAGS " -DJSON_STRICT_BINARY_UTF8=1")
|
|
||||||
endif()
|
|
||||||
if (JSON_DeleteDeprecatedFunctions)
|
|
||||||
string(APPEND NLOHMANN_JSON_PKGCONFIG_CFLAGS " -DJSON_DELETE_DEPRECATED_FUNCTIONS=1")
|
|
||||||
endif()
|
|
||||||
configure_file(
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/pkg-config.pc.in"
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/pkg-config.pc.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
|
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
|
||||||
@ONLY
|
@ONLY
|
||||||
@@ -232,11 +162,9 @@ configure_file(
|
|||||||
## TESTS
|
## TESTS
|
||||||
## create and configure the unit test target
|
## create and configure the unit test target
|
||||||
##
|
##
|
||||||
# Only build tests when JSON_BuildTests is set and testing has not been
|
if (JSON_BuildTests)
|
||||||
# disabled by a parent project via BUILD_TESTING (see the CTest module, which
|
|
||||||
# also calls enable_testing()).
|
|
||||||
if (JSON_BuildTests AND (NOT DEFINED BUILD_TESTING OR BUILD_TESTING))
|
|
||||||
include(CTest)
|
include(CTest)
|
||||||
|
enable_testing()
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -272,7 +200,7 @@ if(JSON_Install)
|
|||||||
install(
|
install(
|
||||||
FILES ${NLOHMANN_NATVIS_FILE}
|
FILES ${NLOHMANN_NATVIS_FILE}
|
||||||
DESTINATION .
|
DESTINATION .
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
export(
|
export(
|
||||||
TARGETS ${NLOHMANN_JSON_TARGET_NAME}
|
TARGETS ${NLOHMANN_JSON_TARGET_NAME}
|
||||||
|
|||||||
+3272
File diff suppressed because it is too large.
Load diff
@@ -6,35 +6,19 @@ This file describes the source for supporting files; that is, files that are not
|
|||||||
- [GitHub](#github)
|
- [GitHub](#github)
|
||||||
- [REUSE](#reuse)
|
- [REUSE](#reuse)
|
||||||
- [Package Managers](#package-managers)
|
- [Package Managers](#package-managers)
|
||||||
- [Debugging](#debugging)
|
|
||||||
|
|
||||||
## Continuous Integration
|
## Continuous Integration
|
||||||
|
|
||||||
### `.github/workflows`
|
### `.cirrus.yml`
|
||||||
|
|
||||||
The [GitHub Actions](https://docs.github.com/en/actions) workflows that build, test, and analyze the library. Each file in this folder defines one workflow:
|
Configuration file for the pipeline at [Cirrus CI](https://cirrus-ci.com/github/nlohmann/json).
|
||||||
|
|
||||||
- `ubuntu.yml`, `macos.yml`, `windows.yml` — build and run the test suite on Linux, macOS, and Windows.
|
|
||||||
- `check_amalgamation.yml` — verify on pull requests and pushes to `develop` that the generated files (the single-header amalgamation in `single_include`, `BUILD.bazel`, and `nlohmann_json.natvis`) are up to date.
|
|
||||||
- `comment_check_amalgamation.yml` — comment on a pull request when the amalgamation check failed.
|
|
||||||
- `cifuzz.yml` — run short fuzzing sessions via [OSS-Fuzz CIFuzz](https://google.github.io/oss-fuzz/getting-started/continuous-integration/) on pull requests.
|
|
||||||
- `codeql-analysis.yml` — run [CodeQL](https://codeql.github.com) code scanning.
|
|
||||||
- `flawfinder.yml` — run the [Flawfinder](https://dwheeler.com/flawfinder/) static analysis.
|
|
||||||
- `semgrep.yml` — run [Semgrep](https://semgrep.dev) static analysis.
|
|
||||||
- `scorecards.yml` — run the [OpenSSF Scorecard](https://securityscorecards.dev) supply-chain security checks.
|
|
||||||
- `dependency-review.yml` — scan dependency changes in pull requests for known vulnerabilities.
|
|
||||||
- `labeler.yml` — the "Pull Request Labeler" workflow (see `.github/labeler.yml`).
|
|
||||||
- `stale.yml` — comment on and close stale issues and pull requests.
|
|
||||||
- `publish_documentation.yml` — build and publish the documentation on pushes to the `develop` branch that touch the documentation sources (or the files it embeds).
|
|
||||||
- `check_docs_links.yml` — check the links of the documentation weekly, as external links can break without any change in this repository.
|
|
||||||
- `cancel_closed_pr_runs.yml` — cancel unfinished workflow runs of a pull request once it is closed or merged.
|
|
||||||
|
|
||||||
Further documentation:
|
Further documentation:
|
||||||
|
|
||||||
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions)
|
- [Writing tasks](https://cirrus-ci.org/guide/writing-tasks/)
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> The folder `.github/workflows` is predetermined by GitHub.
|
> The filename `.cirrus.yml` and position (root of the repository) are predetermined by Cirrus CI.
|
||||||
|
|
||||||
### `.github/external_ci/appveyor.yml`
|
### `.github/external_ci/appveyor.yml`
|
||||||
|
|
||||||
@@ -108,7 +92,7 @@ Further documentation:
|
|||||||
|
|
||||||
### `.github/dependabot.yml`
|
### `.github/dependabot.yml`
|
||||||
|
|
||||||
The configuration of [dependabot](https://github.com/dependabot) which ensures the dependencies (GitHub actions and Python packages used in the CI) remain up to date.
|
The configuration of [dependabot](https://github.com/dependabot) which ensures the dependencies (GitHub actions and Python packages used in the CI) remain up-to-date.
|
||||||
|
|
||||||
Further documentation:
|
Further documentation:
|
||||||
|
|
||||||
@@ -139,7 +123,7 @@ Further documentation:
|
|||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> The folder `.github/ISSUE_TEMPLATE` is predetermined by GitHub.
|
> The folder `.github/ISSUE_TEMPLATE` is predetermined by GitHub.
|
||||||
|
|
||||||
### `.github/ISSUE_TEMPLATE/config.yml`
|
### `.github/ISSUE_TEMPLATE/config.yaml`
|
||||||
|
|
||||||
Issue template chooser configuration. The file is used to configure the dialog when a new issue is created.
|
Issue template chooser configuration. The file is used to configure the dialog when a new issue is created.
|
||||||
|
|
||||||
@@ -148,7 +132,7 @@ Further documentation:
|
|||||||
- [Configuring issue templates for your repository](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository)
|
- [Configuring issue templates for your repository](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository)
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> The filename `.github/ISSUE_TEMPLATE/config.yml` is predetermined by GitHub.
|
> The filename `.github/ISSUE_TEMPLATE/config.yaml` is predetermined by GitHub.
|
||||||
|
|
||||||
### `.github/labeler.yml`
|
### `.github/labeler.yml`
|
||||||
|
|
||||||
@@ -181,7 +165,7 @@ Further documentation:
|
|||||||
- [Adding a security policy to your repository](https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository)
|
- [Adding a security policy to your repository](https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository)
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> The filename `.github/SECURITY.md` is predetermined by GitHub.
|
> The filename `.github/SECURITY.yml` is predetermined by GitHub.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> The file is part of the documentation and is included in `docs/mkdocs/docs/community/security_policy.md`.
|
> The file is part of the documentation and is included in `docs/mkdocs/docs/community/security_policy.md`.
|
||||||
@@ -199,19 +183,19 @@ Further documentation:
|
|||||||
|
|
||||||
## REUSE
|
## REUSE
|
||||||
|
|
||||||
### `REUSE.toml`
|
### `.reuse/dep5`
|
||||||
|
|
||||||
The file defines the licenses of certain third-party components in the repository. The root `Makefile` contains a target `reuse` that checks for compliance.
|
The file defines the licenses of certain third-party component in the repository. The root `Makefile` contains a target `reuse` that checks for compliance.
|
||||||
|
|
||||||
Further documentation:
|
Further documentation:
|
||||||
|
|
||||||
- [REUSE.toml](https://reuse.software/spec-3.3/#reusetoml)
|
- [DEP5](https://reuse.software/spec-3.2/#dep5-deprecated)
|
||||||
- [reuse command-line tool](https://pypi.org/project/reuse/)
|
- [reuse command-line tool](https://pypi.org/project/reuse/)
|
||||||
- [documentation of linting](https://reuse.readthedocs.io/en/stable/man/reuse-lint.html)
|
- [documentation of linting](https://reuse.readthedocs.io/en/stable/man/reuse-lint.html)
|
||||||
- [REUSE](http://reuse.software)
|
- [REUSE](http://reuse.software)
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> The filename `REUSE.toml` is predetermined by REUSE. Alternatively, a `.reuse/dep5` file (deprecated) can be used.
|
> The filename `.reuse/dep5` is predetermined by REUSE. Alternatively, a `REUSE.toml` file can be used.
|
||||||
|
|
||||||
### `.reuse/templates`
|
### `.reuse/templates`
|
||||||
|
|
||||||
@@ -228,7 +212,7 @@ Further information:
|
|||||||
|
|
||||||
### `LICENSES`
|
### `LICENSES`
|
||||||
|
|
||||||
A folder that contains every license of all license files (library and third-party code).
|
A folder that contains every license of all licenses files (library and third-party code).
|
||||||
|
|
||||||
Further documentation:
|
Further documentation:
|
||||||
|
|
||||||
@@ -242,77 +226,14 @@ Further documentation:
|
|||||||
|
|
||||||
### `BUILD.bazel`
|
### `BUILD.bazel`
|
||||||
|
|
||||||
The build definition for [Bazel](https://bazel.build). The file is generated by
|
The file can be updated by calling
|
||||||
`cmake/scripts/gen_bazel_build_file.cmake`, which derives the header list from the files in `include`; change the
|
|
||||||
script rather than editing the file by hand. The file can be updated by calling
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
make BUILD.bazel
|
make BUILD.bazel
|
||||||
```
|
```
|
||||||
|
|
||||||
The "Check amalgamation" workflow fails if the file is out of date.
|
### `meson.build`
|
||||||
|
|
||||||
### `meson.build` and `meson_options.txt`
|
|
||||||
|
|
||||||
Meson build definitions suitable for use as a subproject ("wrap" in Meson terminology).
|
|
||||||
|
|
||||||
Projects wishing to use the wrap can execute:
|
|
||||||
```sh
|
|
||||||
meson wrap install nlohmann_json
|
|
||||||
```
|
|
||||||
|
|
||||||
Which allows Meson to build from source when a system provided dependency isn't available.
|
|
||||||
|
|
||||||
To build directly:
|
|
||||||
```sh
|
|
||||||
meson setup builddir
|
|
||||||
ninja -C builddir
|
|
||||||
```
|
|
||||||
|
|
||||||
`meson_options.txt` defines the options, which mirror the names of the CMake options that change the library's target (for example,
|
|
||||||
`-DDiagnostics=true`); their defaults may differ (for example, `MultipleHeaders` defaults to `false` in Meson, while
|
|
||||||
`JSON_MultipleHeaders` is `ON` in CMake). Meson requires this file next to `meson.build`, so it is also part of `include.zip`. `make check_build_options`
|
|
||||||
([`tools/check_build_options`](tools/check_build_options/README.md)) checks in CI that both files and the pkg-config files
|
|
||||||
stay in sync with the CMake options.
|
|
||||||
|
|
||||||
When installing, `meson.build` installs the headers, a pkg-config file, and the CMake package config files, so that
|
|
||||||
`find_package(nlohmann_json)` works. As Meson cannot generate `nlohmann_jsonTargets.cmake` itself, it is created from
|
|
||||||
the template `cmake/nlohmann_jsonTargets.cmake.in`, which is only used by Meson.
|
|
||||||
|
|
||||||
### `Package.swift`
|
### `Package.swift`
|
||||||
|
|
||||||
The package manifest for the [Swift Package Manager](https://www.swift.org/package-manager/).
|
### `WORKSPACE.bazel`
|
||||||
|
|
||||||
### `MODULE.bazel`
|
|
||||||
|
|
||||||
The module definition for [Bazel](https://bazel.build)'s [Bzlmod](https://bazel.build/external/module) dependency system. It complements `BUILD.bazel` and replaces the previously used `WORKSPACE.bazel`.
|
|
||||||
|
|
||||||
Further documentation:
|
|
||||||
|
|
||||||
- [Bazel modules](https://bazel.build/external/module)
|
|
||||||
|
|
||||||
## Debugging
|
|
||||||
|
|
||||||
### `nlohmann_json.natvis`
|
|
||||||
|
|
||||||
The [Natvis](https://learn.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects) file that
|
|
||||||
gives `json` values a friendly view in the Visual Studio debugger. The file is generated by
|
|
||||||
`tools/generate_natvis/generate_natvis.py` from the template `tools/generate_natvis/nlohmann_json.natvis.j2` and the ABI
|
|
||||||
tags and version in `include/nlohmann/detail/abi_macros.hpp`; change the script or the template rather than editing
|
|
||||||
the file by hand. The file can be updated by calling
|
|
||||||
|
|
||||||
```shell
|
|
||||||
make natvis
|
|
||||||
```
|
|
||||||
|
|
||||||
The "Check amalgamation" workflow fails if the file is out of date.
|
|
||||||
|
|
||||||
The file covers the namespace variants with up to two ABI tags. A Natvis file for other configurations can be
|
|
||||||
generated with the `--abi-tags` or `--all` options, for example
|
|
||||||
`make natvis NATVIS_ARGS="--abi-tags _diag,_dp,_ns --output my_nlohmann_json.natvis"`; see
|
|
||||||
[`tools/generate_natvis`](tools/generate_natvis/README.md). With MSVC, CMake adds the file to the `nlohmann_json`
|
|
||||||
target and installs it.
|
|
||||||
|
|
||||||
Further documentation:
|
|
||||||
|
|
||||||
- [Create custom views of C++ objects in the debugger using the Natvis framework](https://learn.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects)
|
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2013-2026 Niels Lohmann
|
Copyright (c) 2013-2025 Niels Lohmann
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,121 +0,0 @@
|
|||||||
Creative Commons Legal Code
|
|
||||||
|
|
||||||
CC0 1.0 Universal
|
|
||||||
|
|
||||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
|
||||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
|
||||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
|
||||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
|
||||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
|
||||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
|
||||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
|
||||||
HEREUNDER.
|
|
||||||
|
|
||||||
Statement of Purpose
|
|
||||||
|
|
||||||
The laws of most jurisdictions throughout the world automatically confer
|
|
||||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
|
||||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
|
||||||
authorship and/or a database (each, a "Work").
|
|
||||||
|
|
||||||
Certain owners wish to permanently relinquish those rights to a Work for
|
|
||||||
the purpose of contributing to a commons of creative, cultural and
|
|
||||||
scientific works ("Commons") that the public can reliably and without fear
|
|
||||||
of later claims of infringement build upon, modify, incorporate in other
|
|
||||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
|
||||||
and for any purposes, including without limitation commercial purposes.
|
|
||||||
These owners may contribute to the Commons to promote the ideal of a free
|
|
||||||
culture and the further production of creative, cultural and scientific
|
|
||||||
works, or to gain reputation or greater distribution for their Work in
|
|
||||||
part through the use and efforts of others.
|
|
||||||
|
|
||||||
For these and/or other purposes and motivations, and without any
|
|
||||||
expectation of additional consideration or compensation, the person
|
|
||||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
|
||||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
|
||||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
|
||||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
|
||||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
|
||||||
|
|
||||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
|
||||||
protected by copyright and related or neighboring rights ("Copyright and
|
|
||||||
Related Rights"). Copyright and Related Rights include, but are not
|
|
||||||
limited to, the following:
|
|
||||||
|
|
||||||
i. the right to reproduce, adapt, distribute, perform, display,
|
|
||||||
communicate, and translate a Work;
|
|
||||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
||||||
iii. publicity and privacy rights pertaining to a person's image or
|
|
||||||
likeness depicted in a Work;
|
|
||||||
iv. rights protecting against unfair competition in regards to a Work,
|
|
||||||
subject to the limitations in paragraph 4(a), below;
|
|
||||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
|
||||||
in a Work;
|
|
||||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
|
||||||
European Parliament and of the Council of 11 March 1996 on the legal
|
|
||||||
protection of databases, and under any national implementation
|
|
||||||
thereof, including any amended or successor version of such
|
|
||||||
directive); and
|
|
||||||
vii. other similar, equivalent or corresponding rights throughout the
|
|
||||||
world based on applicable law or treaty, and any national
|
|
||||||
implementations thereof.
|
|
||||||
|
|
||||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
|
||||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
|
||||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
|
||||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
|
||||||
of action, whether now known or unknown (including existing as well as
|
|
||||||
future claims and causes of action), in the Work (i) in all territories
|
|
||||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
|
||||||
treaty (including future time extensions), (iii) in any current or future
|
|
||||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
|
||||||
including without limitation commercial, advertising or promotional
|
|
||||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
|
||||||
member of the public at large and to the detriment of Affirmer's heirs and
|
|
||||||
successors, fully intending that such Waiver shall not be subject to
|
|
||||||
revocation, rescission, cancellation, termination, or any other legal or
|
|
||||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
|
||||||
as contemplated by Affirmer's express Statement of Purpose.
|
|
||||||
|
|
||||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
|
||||||
be judged legally invalid or ineffective under applicable law, then the
|
|
||||||
Waiver shall be preserved to the maximum extent permitted taking into
|
|
||||||
account Affirmer's express Statement of Purpose. In addition, to the
|
|
||||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
|
||||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
|
||||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
|
||||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
|
||||||
maximum duration provided by applicable law or treaty (including future
|
|
||||||
time extensions), (iii) in any current or future medium and for any number
|
|
||||||
of copies, and (iv) for any purpose whatsoever, including without
|
|
||||||
limitation commercial, advertising or promotional purposes (the
|
|
||||||
"License"). The License shall be deemed effective as of the date CC0 was
|
|
||||||
applied by Affirmer to the Work. Should any part of the License for any
|
|
||||||
reason be judged legally invalid or ineffective under applicable law, such
|
|
||||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
|
||||||
of the License, and in such case Affirmer hereby affirms that he or she
|
|
||||||
will not (i) exercise any of his or her remaining Copyright and Related
|
|
||||||
Rights in the Work or (ii) assert any associated claims and causes of
|
|
||||||
action with respect to the Work, in either case contrary to Affirmer's
|
|
||||||
express Statement of Purpose.
|
|
||||||
|
|
||||||
4. Limitations and Disclaimers.
|
|
||||||
|
|
||||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
|
||||||
surrendered, licensed or otherwise affected by this document.
|
|
||||||
b. Affirmer offers the Work as-is and makes no representations or
|
|
||||||
warranties of any kind concerning the Work, express, implied,
|
|
||||||
statutory or otherwise, including without limitation warranties of
|
|
||||||
title, merchantability, fitness for a particular purpose, non
|
|
||||||
infringement, or the absence of latent or other defects, accuracy, or
|
|
||||||
the present or absence of errors, whether or not discoverable, all to
|
|
||||||
the greatest extent permissible under applicable law.
|
|
||||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
|
||||||
that may apply to the Work or any use thereof, including without
|
|
||||||
limitation any person's Copyright and Related Rights in the Work.
|
|
||||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
|
||||||
consents, permissions or other rights required for any use of the
|
|
||||||
Work.
|
|
||||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
|
||||||
party to this document and has no duty or obligation with respect to
|
|
||||||
this CC0 or use of the Work.
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
module(
|
module(
|
||||||
name = "nlohmann_json",
|
name = "nlohmann_json",
|
||||||
version = "3.12.0",
|
|
||||||
compatibility_level = 1,
|
compatibility_level = 1,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.PHONY: all amalgamate check-amalgamation check_build_options pretty install_astyle clean release update_hedley update_hedley_undef BUILD.bazel natvis macro_builder_check run_benchmarks pvs_studio serve_header reuse spdx
|
.PHONY: pretty clean ChangeLog.md release
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# configuration
|
# configuration
|
||||||
@@ -7,9 +7,6 @@
|
|||||||
# find GNU sed to use `-i` parameter
|
# find GNU sed to use `-i` parameter
|
||||||
SED:=$(shell command -v gsed || which sed)
|
SED:=$(shell command -v gsed || which sed)
|
||||||
|
|
||||||
# find GNU tar to use `--sort` and `--pax-option` parameters
|
|
||||||
TAR:=$(shell command -v gtar || which tar)
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# source files
|
# source files
|
||||||
@@ -24,12 +21,6 @@ TESTS_SRCS=$(shell find tests -type f \( -name '*.hpp' -o -name '*.cpp' -o -name
|
|||||||
# the single headers (amalgamated from the source files)
|
# the single headers (amalgamated from the source files)
|
||||||
AMALGAMATED_FILE=single_include/nlohmann/json.hpp
|
AMALGAMATED_FILE=single_include/nlohmann/json.hpp
|
||||||
AMALGAMATED_FWD_FILE=single_include/nlohmann/json_fwd.hpp
|
AMALGAMATED_FWD_FILE=single_include/nlohmann/json_fwd.hpp
|
||||||
# json_literals.hpp only includes <nlohmann/json.hpp>, so it is copied verbatim
|
|
||||||
AMALGAMATED_LITERALS_FILE=single_include/nlohmann/json_literals.hpp
|
|
||||||
AMALGAMATED_VIEW_FILE=single_include/nlohmann/json_view.hpp
|
|
||||||
|
|
||||||
# the header with the argument-counting macros generated by tools/macro_builder
|
|
||||||
MACRO_SCOPE_HPP=include/nlohmann/detail/macro_scope.hpp
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
@@ -38,23 +29,18 @@ MACRO_SCOPE_HPP=include/nlohmann/detail/macro_scope.hpp
|
|||||||
|
|
||||||
# main target
|
# main target
|
||||||
all:
|
all:
|
||||||
@echo "amalgamate - amalgamate files single_include/nlohmann/json{,_fwd,_literals,_view}.hpp from the include/nlohmann sources"
|
@echo "amalgamate - amalgamate files single_include/nlohmann/json{,_fwd}.hpp from the include/nlohmann sources"
|
||||||
@echo "BUILD.bazel - regenerate the Bazel BUILD file from the include/nlohmann sources"
|
@echo "ChangeLog.md - generate ChangeLog file"
|
||||||
@echo "check-amalgamation - check whether sources have been amalgamated and BUILD.bazel is up to date"
|
@echo "check-amalgamation - check whether sources have been amalgamated"
|
||||||
@echo "check_build_options - check that the Meson build and the pkg-config files offer the options of the CMake target"
|
|
||||||
@echo "clean - remove built files"
|
@echo "clean - remove built files"
|
||||||
@echo "(fuzzers) - see tests/fuzzing.md, or run 'make -C tests fuzzers' to build the AFL fuzzers"
|
@echo "doctest - compile example files and check their output"
|
||||||
@echo "macro_builder_check - check that macro_scope.hpp matches tools/macro_builder's output"
|
@echo "fuzz_testing - prepare fuzz testing of the JSON parser"
|
||||||
@echo "natvis - regenerate nlohmann_json.natvis from the current ABI tags and version (pass generator options via NATVIS_ARGS, see tools/generate_natvis/README.md)"
|
@echo "fuzz_testing_bson - prepare fuzz testing of the BSON parser"
|
||||||
|
@echo "fuzz_testing_cbor - prepare fuzz testing of the CBOR parser"
|
||||||
|
@echo "fuzz_testing_msgpack - prepare fuzz testing of the MessagePack parser"
|
||||||
|
@echo "fuzz_testing_ubjson - prepare fuzz testing of the UBJSON parser"
|
||||||
@echo "pretty - beautify code with Artistic Style"
|
@echo "pretty - beautify code with Artistic Style"
|
||||||
@echo "pvs_studio - run the PVS-Studio static analyzer and open the report"
|
|
||||||
@echo "release - create the release files (include.zip, json.tar.xz, single headers, signatures, hashes)"
|
|
||||||
@echo "reuse - annotate the source files with REUSE license headers and lint them"
|
|
||||||
@echo "run_benchmarks - build and run benchmarks"
|
@echo "run_benchmarks - build and run benchmarks"
|
||||||
@echo "serve_header - serve the single header, re-amalgamated on demand (see tools/serve_header)"
|
|
||||||
@echo "spdx - generate the SPDX software bill of materials nlohmann_json.spdx"
|
|
||||||
@echo "update_hedley - download Hedley and regenerate hedley.hpp / hedley_undef.hpp"
|
|
||||||
@echo "update_hedley_undef - rebuild hedley_undef.hpp from the JSON_HEDLEY_* #define names in hedley.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
@@ -69,6 +55,66 @@ run_benchmarks:
|
|||||||
cd cmake-build-benchmarks ; ./json_benchmarks
|
cd cmake-build-benchmarks ; ./json_benchmarks
|
||||||
|
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
# fuzzing
|
||||||
|
##########################################################################
|
||||||
|
|
||||||
|
# the overall fuzz testing target
|
||||||
|
fuzz_testing:
|
||||||
|
rm -fr fuzz-testing
|
||||||
|
mkdir -p fuzz-testing fuzz-testing/testcases fuzz-testing/out
|
||||||
|
$(MAKE) parse_afl_fuzzer -C tests CXX=afl-clang++
|
||||||
|
mv tests/parse_afl_fuzzer fuzz-testing/fuzzer
|
||||||
|
find tests/data/json_tests -size -5k -name *json | xargs -I{} cp "{}" fuzz-testing/testcases
|
||||||
|
@echo "Execute: afl-fuzz -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer"
|
||||||
|
|
||||||
|
fuzz_testing_bson:
|
||||||
|
rm -fr fuzz-testing
|
||||||
|
mkdir -p fuzz-testing fuzz-testing/testcases fuzz-testing/out
|
||||||
|
$(MAKE) parse_bson_fuzzer -C tests CXX=afl-clang++
|
||||||
|
mv tests/parse_bson_fuzzer fuzz-testing/fuzzer
|
||||||
|
find tests/data -size -5k -name *.bson | xargs -I{} cp "{}" fuzz-testing/testcases
|
||||||
|
@echo "Execute: afl-fuzz -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer"
|
||||||
|
|
||||||
|
fuzz_testing_cbor:
|
||||||
|
rm -fr fuzz-testing
|
||||||
|
mkdir -p fuzz-testing fuzz-testing/testcases fuzz-testing/out
|
||||||
|
$(MAKE) parse_cbor_fuzzer -C tests CXX=afl-clang++
|
||||||
|
mv tests/parse_cbor_fuzzer fuzz-testing/fuzzer
|
||||||
|
find tests/data -size -5k -name *.cbor | xargs -I{} cp "{}" fuzz-testing/testcases
|
||||||
|
@echo "Execute: afl-fuzz -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer"
|
||||||
|
|
||||||
|
fuzz_testing_msgpack:
|
||||||
|
rm -fr fuzz-testing
|
||||||
|
mkdir -p fuzz-testing fuzz-testing/testcases fuzz-testing/out
|
||||||
|
$(MAKE) parse_msgpack_fuzzer -C tests CXX=afl-clang++
|
||||||
|
mv tests/parse_msgpack_fuzzer fuzz-testing/fuzzer
|
||||||
|
find tests/data -size -5k -name *.msgpack | xargs -I{} cp "{}" fuzz-testing/testcases
|
||||||
|
@echo "Execute: afl-fuzz -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer"
|
||||||
|
|
||||||
|
fuzz_testing_ubjson:
|
||||||
|
rm -fr fuzz-testing
|
||||||
|
mkdir -p fuzz-testing fuzz-testing/testcases fuzz-testing/out
|
||||||
|
$(MAKE) parse_ubjson_fuzzer -C tests CXX=afl-clang++
|
||||||
|
mv tests/parse_ubjson_fuzzer fuzz-testing/fuzzer
|
||||||
|
find tests/data -size -5k -name *.ubjson | xargs -I{} cp "{}" fuzz-testing/testcases
|
||||||
|
@echo "Execute: afl-fuzz -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer"
|
||||||
|
|
||||||
|
fuzzing-start:
|
||||||
|
afl-fuzz -S fuzzer1 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer > /dev/null &
|
||||||
|
afl-fuzz -S fuzzer2 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer > /dev/null &
|
||||||
|
afl-fuzz -S fuzzer3 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer > /dev/null &
|
||||||
|
afl-fuzz -S fuzzer4 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer > /dev/null &
|
||||||
|
afl-fuzz -S fuzzer5 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer > /dev/null &
|
||||||
|
afl-fuzz -S fuzzer6 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer > /dev/null &
|
||||||
|
afl-fuzz -S fuzzer7 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer > /dev/null &
|
||||||
|
afl-fuzz -M fuzzer0 -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzzer
|
||||||
|
|
||||||
|
fuzzing-stop:
|
||||||
|
-killall fuzzer
|
||||||
|
-killall afl-fuzz
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# Static analysis
|
# Static analysis
|
||||||
##########################################################################
|
##########################################################################
|
||||||
@@ -96,10 +142,14 @@ install_astyle:
|
|||||||
|
|
||||||
# call the Artistic Style pretty printer on all source files
|
# call the Artistic Style pretty printer on all source files
|
||||||
pretty: install_astyle
|
pretty: install_astyle
|
||||||
$(ASTYLE) --project=tools/astyle/.astylerc $(SRCS) $(TESTS_SRCS) $(AMALGAMATED_FILE) $(AMALGAMATED_FWD_FILE) $(AMALGAMATED_LITERALS_FILE) $(AMALGAMATED_VIEW_FILE) docs/mkdocs/docs/examples/*.cpp docs/mkdocs/docs/examples/*.hpp
|
$(ASTYLE) --project=tools/astyle/.astylerc $(SRCS) $(TESTS_SRCS) $(AMALGAMATED_FILE) $(AMALGAMATED_FWD_FILE) docs/mkdocs/docs/examples/*.cpp
|
||||||
|
|
||||||
|
# call the Clang-Format on all source files
|
||||||
|
pretty_format:
|
||||||
|
for FILE in $(SRCS) $(TESTS_SRCS) $(AMALGAMATED_FILE) docs/mkdocs/docs/examples/*.cpp; do echo $$FILE; clang-format -i $$FILE; done
|
||||||
|
|
||||||
# create single header files and pretty print
|
# create single header files and pretty print
|
||||||
amalgamate: $(AMALGAMATED_FILE) $(AMALGAMATED_FWD_FILE) $(AMALGAMATED_LITERALS_FILE) $(AMALGAMATED_VIEW_FILE)
|
amalgamate: $(AMALGAMATED_FILE) $(AMALGAMATED_FWD_FILE)
|
||||||
$(MAKE) pretty
|
$(MAKE) pretty
|
||||||
|
|
||||||
# call the amalgamation tool for json.hpp
|
# call the amalgamation tool for json.hpp
|
||||||
@@ -110,70 +160,36 @@ $(AMALGAMATED_FILE): $(SRCS)
|
|||||||
$(AMALGAMATED_FWD_FILE): $(SRCS)
|
$(AMALGAMATED_FWD_FILE): $(SRCS)
|
||||||
tools/amalgamate/amalgamate.py -c tools/amalgamate/config_json_fwd.json -s . --verbose=yes
|
tools/amalgamate/amalgamate.py -c tools/amalgamate/config_json_fwd.json -s . --verbose=yes
|
||||||
|
|
||||||
# copy json_literals.hpp
|
# check if file single_include/nlohmann/json.hpp has been amalgamated from the nlohmann sources
|
||||||
$(AMALGAMATED_LITERALS_FILE): include/nlohmann/json_literals.hpp
|
# Note: this target is called by Travis
|
||||||
cp include/nlohmann/json_literals.hpp $(AMALGAMATED_LITERALS_FILE)
|
|
||||||
|
|
||||||
# call the amalgamation tool for json_view.hpp (keeps including json.hpp)
|
|
||||||
$(AMALGAMATED_VIEW_FILE): $(SRCS)
|
|
||||||
tools/amalgamate/amalgamate.py -c tools/amalgamate/config_json_view.json -s . --verbose=yes
|
|
||||||
|
|
||||||
NATVIS_VENV=tools/generate_natvis/venv
|
|
||||||
# extra options for generate_natvis.py, e.g. NATVIS_ARGS="--abi-tags _diag,_dp,_ns --output my.natvis"
|
|
||||||
NATVIS_ARGS=
|
|
||||||
|
|
||||||
# regenerate nlohmann_json.natvis from the ABI tags and version in include/nlohmann/detail/abi_macros.hpp
|
|
||||||
# (the dependencies are installed into a virtual environment first)
|
|
||||||
natvis:
|
|
||||||
@test -d $(NATVIS_VENV) || python3 -mvenv $(NATVIS_VENV)
|
|
||||||
@$(NATVIS_VENV)/bin/python3 -c 'import jinja2' 2>/dev/null || $(NATVIS_VENV)/bin/pip3 install --quiet -r tools/generate_natvis/requirements.txt
|
|
||||||
$(NATVIS_VENV)/bin/python3 tools/generate_natvis/generate_natvis.py $(NATVIS_ARGS) .
|
|
||||||
|
|
||||||
# regenerate the two tools/macro_builder blocks of $(MACRO_SCOPE_HPP) (see its README.md) and diff against the
|
|
||||||
# checked-in header; phony, because it never writes $(MACRO_SCOPE_HPP) itself
|
|
||||||
macro_builder_check: install_astyle
|
|
||||||
@set -e; \
|
|
||||||
TMPDIR=$$(mktemp -d ./macro_builder_check.XXXXXX); \
|
|
||||||
trap 'rm -rf "$$TMPDIR"' EXIT; \
|
|
||||||
$(CXX) -std=c++11 tools/macro_builder/main.cpp -o "$$TMPDIR/macro_builder"; \
|
|
||||||
"$$TMPDIR/macro_builder" > "$$TMPDIR/paste.hpp"; \
|
|
||||||
"$$TMPDIR/macro_builder" type_body > "$$TMPDIR/type_body.hpp"; \
|
|
||||||
$(ASTYLE) --project=tools/astyle/.astylerc --suffix=none --quiet "$$TMPDIR/paste.hpp" "$$TMPDIR/type_body.hpp"; \
|
|
||||||
sed -n '/^#define NLOHMANN_JSON_EXPAND( x ) x$$/,/^#define NLOHMANN_JSON_DOUBLE_PASTE63(/p' $(MACRO_SCOPE_HPP) > "$$TMPDIR/paste_actual.hpp"; \
|
|
||||||
sed -n '/^#define NLOHMANN_JSON_TYPE_BODY(Prefix, \.\.\.)/,/^ NLOHMANN_JSON_TYPE_BODY_SENTINEL))$$/p' $(MACRO_SCOPE_HPP) > "$$TMPDIR/type_body_actual.hpp"; \
|
|
||||||
diff "$$TMPDIR/paste.hpp" "$$TMPDIR/paste_actual.hpp" || (echo "===================================================================\n $(MACRO_SCOPE_HPP) (NLOHMANN_JSON_EXPAND..NLOHMANN_JSON_DOUBLE_PASTE63) is out of date!\n Regenerate it, see tools/macro_builder/README.md.\n===================================================================" ; exit 1); \
|
|
||||||
diff "$$TMPDIR/type_body.hpp" "$$TMPDIR/type_body_actual.hpp" || (echo "===================================================================\n $(MACRO_SCOPE_HPP) (NLOHMANN_JSON_TYPE_BODY) is out of date!\n Regenerate it, see tools/macro_builder/README.md.\n===================================================================" ; exit 1)
|
|
||||||
|
|
||||||
# check that the Meson build and the pkg-config files offer the options of the CMake target
|
|
||||||
check_build_options:
|
|
||||||
python3 tools/check_build_options/check_build_options.py .
|
|
||||||
|
|
||||||
# check if the single headers have been amalgamated from the nlohmann sources and if BUILD.bazel and
|
|
||||||
# nlohmann_json.natvis are up to date; all checks are run, and the checked-in files are always restored
|
|
||||||
check-amalgamation:
|
check-amalgamation:
|
||||||
@status=0; \
|
@mv $(AMALGAMATED_FILE) $(AMALGAMATED_FILE)~
|
||||||
banner() { printf '===================================================================\n %s\n===================================================================\n' "$$1"; }; \
|
@mv $(AMALGAMATED_FWD_FILE) $(AMALGAMATED_FWD_FILE)~
|
||||||
for FILE in $(AMALGAMATED_FILE) $(AMALGAMATED_FWD_FILE) $(AMALGAMATED_LITERALS_FILE) $(AMALGAMATED_VIEW_FILE) BUILD.bazel nlohmann_json.natvis; do \
|
@$(MAKE) amalgamate
|
||||||
mv "$$FILE" "$$FILE~" || exit 1; \
|
@diff $(AMALGAMATED_FILE) $(AMALGAMATED_FILE)~ || (echo "===================================================================\n Amalgamation required! Please read the contribution guidelines\n in file .github/CONTRIBUTING.md.\n===================================================================" ; mv $(AMALGAMATED_FILE)~ $(AMALGAMATED_FILE) ; false)
|
||||||
done; \
|
@diff $(AMALGAMATED_FWD_FILE) $(AMALGAMATED_FWD_FILE)~ || (echo "===================================================================\n Amalgamation required! Please read the contribution guidelines\n in file .github/CONTRIBUTING.md.\n===================================================================" ; mv $(AMALGAMATED_FWD_FILE)~ $(AMALGAMATED_FWD_FILE) ; false)
|
||||||
$(MAKE) amalgamate || status=1; \
|
@mv $(AMALGAMATED_FILE)~ $(AMALGAMATED_FILE)
|
||||||
$(MAKE) BUILD.bazel || status=1; \
|
@mv $(AMALGAMATED_FWD_FILE)~ $(AMALGAMATED_FWD_FILE)
|
||||||
$(MAKE) natvis || status=1; \
|
|
||||||
for FILE in $(AMALGAMATED_FILE) $(AMALGAMATED_FWD_FILE) $(AMALGAMATED_LITERALS_FILE) $(AMALGAMATED_VIEW_FILE); do \
|
|
||||||
diff "$$FILE" "$$FILE~" || { banner "$$FILE is out of date! Amalgamation required! Please read the contribution guidelines in file .github/CONTRIBUTING.md."; status=1; }; \
|
|
||||||
done; \
|
|
||||||
diff BUILD.bazel BUILD.bazel~ || { banner "BUILD.bazel is out of date! Please run 'make BUILD.bazel'."; status=1; }; \
|
|
||||||
diff nlohmann_json.natvis nlohmann_json.natvis~ || { banner "nlohmann_json.natvis is out of date! Please run 'make natvis'."; status=1; }; \
|
|
||||||
for FILE in $(AMALGAMATED_FILE) $(AMALGAMATED_FWD_FILE) $(AMALGAMATED_LITERALS_FILE) $(AMALGAMATED_VIEW_FILE) BUILD.bazel nlohmann_json.natvis; do \
|
|
||||||
mv "$$FILE~" "$$FILE"; \
|
|
||||||
done; \
|
|
||||||
$(MAKE) macro_builder_check || status=1; \
|
|
||||||
exit $$status
|
|
||||||
|
|
||||||
# generate the Bazel BUILD file; phony, because a removed header would not trigger a rebuild
|
BUILD.bazel: $(SRCS)
|
||||||
BUILD.bazel:
|
|
||||||
cmake -P cmake/scripts/gen_bazel_build_file.cmake
|
cmake -P cmake/scripts/gen_bazel_build_file.cmake
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
# ChangeLog
|
||||||
|
##########################################################################
|
||||||
|
|
||||||
|
# Create a ChangeLog based on the git log using the GitHub Changelog Generator
|
||||||
|
# (<https://github.com/github-changelog-generator/github-changelog-generator>).
|
||||||
|
|
||||||
|
# variable to control the diffs between the last released version and the current repository state
|
||||||
|
NEXT_VERSION ?= "unreleased"
|
||||||
|
|
||||||
|
ChangeLog.md:
|
||||||
|
github_changelog_generator -o ChangeLog.md --user nlohmann --project json --simple-list --release-url https://github.com/nlohmann/json/releases/tag/%s --future-release $(NEXT_VERSION)
|
||||||
|
$(SED) -i 's|https://github.com/nlohmann/json/releases/tag/HEAD|https://github.com/nlohmann/json/tree/HEAD|' ChangeLog.md
|
||||||
|
$(SED) -i '2i All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).' ChangeLog.md
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# Release files
|
# Release files
|
||||||
##########################################################################
|
##########################################################################
|
||||||
@@ -182,14 +198,14 @@ BUILD.bazel:
|
|||||||
# archive is created according to the advices of <https://reproducible-builds.org/docs/archives/>.
|
# archive is created according to the advices of <https://reproducible-builds.org/docs/archives/>.
|
||||||
json.tar.xz:
|
json.tar.xz:
|
||||||
mkdir json
|
mkdir json
|
||||||
rsync -R $(shell find LICENSE.MIT nlohmann_json.natvis CMakeLists.txt cmake/*.in include single_include src/modules -type f) json
|
rsync -R $(shell find LICENSE.MIT nlohmann_json.natvis CMakeLists.txt cmake/*.in include single_include -type f) json
|
||||||
$(TAR) --sort=name --mtime="@$(shell git log -1 --pretty=%ct)" --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime --create --file - json | xz --compress -9e --threads=2 - > json.tar.xz
|
gtar --sort=name --mtime="@$(shell git log -1 --pretty=%ct)" --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime --create --file - json | xz --compress -9e --threads=2 - > json.tar.xz
|
||||||
rm -fr json
|
rm -fr json
|
||||||
|
|
||||||
# We use `-X` to make the resulting ZIP file reproducible, see
|
# We use `-X` to make the resulting ZIP file reproducible, see
|
||||||
# <https://content.pivotal.io/blog/barriers-to-deterministic-reproducible-zip-files>.
|
# <https://content.pivotal.io/blog/barriers-to-deterministic-reproducible-zip-files>.
|
||||||
include.zip: BUILD.bazel
|
include.zip: BUILD.bazel
|
||||||
zip -9 --recurse-paths -X include.zip $(SRCS) $(AMALGAMATED_FILE) $(AMALGAMATED_FWD_FILE) $(AMALGAMATED_LITERALS_FILE) $(AMALGAMATED_VIEW_FILE) BUILD.bazel MODULE.bazel meson.build meson_options.txt LICENSE.MIT
|
zip -9 --recurse-paths -X include.zip $(SRCS) $(AMALGAMATED_FILE) $(AMALGAMATED_FWD_FILE) BUILD.bazel WORKSPACE.bazel meson.build LICENSE.MIT
|
||||||
|
|
||||||
# Create the files for a release and add signatures and hashes.
|
# Create the files for a release and add signatures and hashes.
|
||||||
release: include.zip json.tar.xz
|
release: include.zip json.tar.xz
|
||||||
@@ -198,15 +214,11 @@ release: include.zip json.tar.xz
|
|||||||
gpg --armor --detach-sig include.zip
|
gpg --armor --detach-sig include.zip
|
||||||
gpg --armor --detach-sig $(AMALGAMATED_FILE)
|
gpg --armor --detach-sig $(AMALGAMATED_FILE)
|
||||||
gpg --armor --detach-sig $(AMALGAMATED_FWD_FILE)
|
gpg --armor --detach-sig $(AMALGAMATED_FWD_FILE)
|
||||||
gpg --armor --detach-sig $(AMALGAMATED_LITERALS_FILE)
|
|
||||||
gpg --armor --detach-sig $(AMALGAMATED_VIEW_FILE)
|
|
||||||
gpg --armor --detach-sig json.tar.xz
|
gpg --armor --detach-sig json.tar.xz
|
||||||
cp $(AMALGAMATED_FILE) release_files
|
cp $(AMALGAMATED_FILE) release_files
|
||||||
cp $(AMALGAMATED_FWD_FILE) release_files
|
cp $(AMALGAMATED_FWD_FILE) release_files
|
||||||
cp $(AMALGAMATED_LITERALS_FILE) release_files
|
mv $(AMALGAMATED_FILE).asc $(AMALGAMATED_FWD_FILE).asc json.tar.xz json.tar.xz.asc include.zip include.zip.asc release_files
|
||||||
cp $(AMALGAMATED_VIEW_FILE) release_files
|
cd release_files ; shasum -a 256 json.hpp include.zip json.tar.xz > hashes.txt
|
||||||
mv $(AMALGAMATED_FILE).asc $(AMALGAMATED_FWD_FILE).asc $(AMALGAMATED_LITERALS_FILE).asc $(AMALGAMATED_VIEW_FILE).asc json.tar.xz json.tar.xz.asc include.zip include.zip.asc release_files
|
|
||||||
cd release_files ; shasum -a 256 $$(find . -type f -not -name '*.asc' | sed 's|^\./||' | sort) > hashes.txt
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
@@ -215,8 +227,9 @@ release: include.zip json.tar.xz
|
|||||||
|
|
||||||
# clean up
|
# clean up
|
||||||
clean:
|
clean:
|
||||||
rm -fr *.dSYM tests/*.dSYM tests/parse_*_fuzzer
|
rm -fr fuzz fuzz-testing *.dSYM tests/*.dSYM
|
||||||
rm -fr cmake-build-benchmarks cmake-build-pvs-studio release_files
|
rm -fr benchmarks/files/numbers/*.json
|
||||||
|
rm -fr cmake-build-benchmarks fuzz-testing cmake-build-pvs-studio release_files
|
||||||
$(MAKE) clean -Cdocs
|
$(MAKE) clean -Cdocs
|
||||||
|
|
||||||
|
|
||||||
@@ -228,24 +241,11 @@ update_hedley:
|
|||||||
rm -f include/nlohmann/thirdparty/hedley/hedley.hpp include/nlohmann/thirdparty/hedley/hedley_undef.hpp
|
rm -f include/nlohmann/thirdparty/hedley/hedley.hpp include/nlohmann/thirdparty/hedley/hedley_undef.hpp
|
||||||
curl https://raw.githubusercontent.com/nemequ/hedley/master/hedley.h -o include/nlohmann/thirdparty/hedley/hedley.hpp
|
curl https://raw.githubusercontent.com/nemequ/hedley/master/hedley.h -o include/nlohmann/thirdparty/hedley/hedley.hpp
|
||||||
$(SED) -i 's/HEDLEY_/JSON_HEDLEY_/g' include/nlohmann/thirdparty/hedley/hedley.hpp
|
$(SED) -i 's/HEDLEY_/JSON_HEDLEY_/g' include/nlohmann/thirdparty/hedley/hedley.hpp
|
||||||
|
grep "[[:blank:]]*#[[:blank:]]*undef" include/nlohmann/thirdparty/hedley/hedley.hpp | grep -v "__" | sort | uniq | $(SED) 's/ //g' | $(SED) 's/undef/undef /g' > include/nlohmann/thirdparty/hedley/hedley_undef.hpp
|
||||||
$(SED) -i '1s/^/#pragma once\n\n/' include/nlohmann/thirdparty/hedley/hedley.hpp
|
$(SED) -i '1s/^/#pragma once\n\n/' include/nlohmann/thirdparty/hedley/hedley.hpp
|
||||||
$(MAKE) update_hedley_undef
|
$(SED) -i '1s/^/#pragma once\n\n/' include/nlohmann/thirdparty/hedley/hedley_undef.hpp
|
||||||
$(MAKE) amalgamate
|
$(MAKE) amalgamate
|
||||||
|
|
||||||
# Rebuild hedley_undef.hpp from every JSON_HEDLEY_* name that hedley.hpp
|
|
||||||
# #defines. Hedley does not #undef all of its public macros internally (see
|
|
||||||
# #5408), so grepping those #undef lines misses names such as
|
|
||||||
# JSON_HEDLEY_PRAGMA. cmake/scripts/gen_hedley_undef_check.cmake is the
|
|
||||||
# single source of truth for this extraction (tests/CMakeLists.txt uses the
|
|
||||||
# same script, in MODE=checks, to generate the matching leak-check test), so
|
|
||||||
# the vendored header, the generated #undef list, and the regression test
|
|
||||||
# cannot drift apart.
|
|
||||||
update_hedley_undef:
|
|
||||||
cmake -DHEDLEY_HPP=include/nlohmann/thirdparty/hedley/hedley.hpp \
|
|
||||||
-DOUTPUT=include/nlohmann/thirdparty/hedley/hedley_undef.hpp \
|
|
||||||
-DMODE=undef \
|
|
||||||
-P cmake/scripts/gen_hedley_undef_check.cmake
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# serve_header.py
|
# serve_header.py
|
||||||
##########################################################################
|
##########################################################################
|
||||||
@@ -258,8 +258,8 @@ serve_header:
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
reuse:
|
reuse:
|
||||||
pipx run reuse annotate --recursive single_include include -tjson --license MIT --copyright "Niels Lohmann <https://nlohmann.me>" --year "2013-2026" --merge-copyrights
|
pipx run reuse annotate --recursive single_include include -tjson --license MIT --copyright "Niels Lohmann <https://nlohmann.me>" --year "2013-2025" --merge-copyrights
|
||||||
pipx run reuse annotate $(TESTS_SRCS) -tjson_support --license MIT --copyright "Niels Lohmann <https://nlohmann.me>" --year "2013-2026" --merge-copyrights
|
pipx run reuse annotate $(TESTS_SRCS) -tjson_support --license MIT --copyright "Niels Lohmann <https://nlohmann.me>" --year "2013-2025" --merge-copyrights
|
||||||
pipx run reuse lint
|
pipx run reuse lint
|
||||||
|
|
||||||
spdx:
|
spdx:
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ import PackageDescription
|
|||||||
let package = Package(
|
let package = Package(
|
||||||
name: "nlohmann-json",
|
name: "nlohmann-json",
|
||||||
platforms: [
|
platforms: [
|
||||||
.iOS(.v12), .macOS(.v10_13), .tvOS(.v12), .watchOS(.v9), .visionOS(.v1)
|
.iOS(.v12), .macOS(.v10_13), .tvOS(.v12), .watchOS(.v4), .visionOS(.v1)
|
||||||
],
|
],
|
||||||
products: [
|
products: [
|
||||||
.library(name: "json", targets: ["json"])
|
.library(name: "json", targets: ["json"])
|
||||||
|
|||||||
-58
@@ -1,58 +0,0 @@
|
|||||||
version = 1
|
|
||||||
SPDX-PackageName = "json"
|
|
||||||
SPDX-PackageSupplier = "Niels Lohmann <mail@nlohmann.me>"
|
|
||||||
SPDX-PackageDownloadLocation = "https://github.com/nlohmann/json"
|
|
||||||
|
|
||||||
[[annotations]]
|
|
||||||
path = "**"
|
|
||||||
precedence = "aggregate"
|
|
||||||
SPDX-FileCopyrightText = "2013-2026 Niels Lohmann <https://nlohmann.me>"
|
|
||||||
SPDX-License-Identifier = "MIT"
|
|
||||||
|
|
||||||
[[annotations]]
|
|
||||||
path = "include/nlohmann/thirdparty/hedley/hedley.hpp"
|
|
||||||
precedence = "aggregate"
|
|
||||||
SPDX-FileCopyrightText = "2016-2021 Evan Nemerson <evan@nemerson.com>"
|
|
||||||
SPDX-License-Identifier = "CC0-1.0"
|
|
||||||
|
|
||||||
[[annotations]]
|
|
||||||
path = "include/nlohmann/detail/meta/cpp_future.hpp"
|
|
||||||
precedence = "aggregate"
|
|
||||||
SPDX-FileCopyrightText = "2013-2026 Niels Lohmann <https://nlohmann.me> and 2018 The Abseil Authors"
|
|
||||||
SPDX-License-Identifier = "MIT AND Apache-2.0"
|
|
||||||
|
|
||||||
[[annotations]]
|
|
||||||
path = "tests/thirdparty/doctest/**"
|
|
||||||
precedence = "aggregate"
|
|
||||||
SPDX-FileCopyrightText = "2016-2023 Viktor Kirilov"
|
|
||||||
SPDX-License-Identifier = "MIT"
|
|
||||||
|
|
||||||
[[annotations]]
|
|
||||||
path = "tests/thirdparty/fifo_map/**"
|
|
||||||
precedence = "aggregate"
|
|
||||||
SPDX-FileCopyrightText = "2015-2017 Niels Lohmann"
|
|
||||||
SPDX-License-Identifier = "MIT"
|
|
||||||
|
|
||||||
[[annotations]]
|
|
||||||
path = "tests/thirdparty/imapdl/**"
|
|
||||||
precedence = "aggregate"
|
|
||||||
SPDX-FileCopyrightText = "2017 Georg Sauthoff <mail@gms.tf>"
|
|
||||||
SPDX-License-Identifier = "GPL-3.0-only"
|
|
||||||
|
|
||||||
[[annotations]]
|
|
||||||
path = "tools/amalgamate/**"
|
|
||||||
precedence = "aggregate"
|
|
||||||
SPDX-FileCopyrightText = "2012 Erik Edlund <erik.edlund@32767.se>"
|
|
||||||
SPDX-License-Identifier = "BSD-3-Clause"
|
|
||||||
|
|
||||||
[[annotations]]
|
|
||||||
path = "tools/gdb_pretty_printer/**"
|
|
||||||
precedence = "aggregate"
|
|
||||||
SPDX-FileCopyrightText = "2020 Hannes Domani <https://github.com/ssbssa>"
|
|
||||||
SPDX-License-Identifier = "MIT"
|
|
||||||
|
|
||||||
[[annotations]]
|
|
||||||
path = "docs/docset/icon*.png"
|
|
||||||
precedence = "override"
|
|
||||||
SPDX-FileCopyrightText = "JSON logo (public domain), https://commons.wikimedia.org/wiki/File:JSON_vector_logo.svg"
|
|
||||||
SPDX-License-Identifier = "CC0-1.0"
|
|
||||||
+124
-366
@@ -5,26 +5,27 @@ set(N 10)
|
|||||||
# Needed tools.
|
# Needed tools.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
include(FindPython3)
|
||||||
find_package(Python3 COMPONENTS Interpreter)
|
find_package(Python3 COMPONENTS Interpreter)
|
||||||
|
|
||||||
find_program(CLANG_TOOL NAMES clang++ clang++-HEAD clang++-22 clang++-21 clang++-20 clang++-19 clang++-18 clang++-17 clang++-16 clang++-15 clang++-14 clang++-13 clang++-12 clang++-11)
|
find_program(CLANG_TOOL NAMES clang++-HEAD clang++ clang++-20 clang++-19 clang++-18 clang++-17 clang++-16 clang++-15 clang++-14 clang++-13 clang++-12 clang++-11 clang++)
|
||||||
execute_process(COMMAND ${CLANG_TOOL} --version OUTPUT_VARIABLE CLANG_TOOL_VERSION ERROR_VARIABLE CLANG_TOOL_VERSION)
|
execute_process(COMMAND ${CLANG_TOOL} --version OUTPUT_VARIABLE CLANG_TOOL_VERSION ERROR_VARIABLE CLANG_TOOL_VERSION)
|
||||||
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" CLANG_TOOL_VERSION "${CLANG_TOOL_VERSION}")
|
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" CLANG_TOOL_VERSION "${CLANG_TOOL_VERSION}")
|
||||||
message(STATUS "🔖 Clang ${CLANG_TOOL_VERSION} (${CLANG_TOOL})")
|
message(STATUS "🔖 Clang ${CLANG_TOOL_VERSION} (${CLANG_TOOL})")
|
||||||
|
|
||||||
find_program(CLANG_TIDY_TOOL NAMES clang-tidy clang-tidy-22 clang-tidy-21 clang-tidy-20 clang-tidy-19 clang-tidy-18 clang-tidy-17 clang-tidy-16 clang-tidy-15 clang-tidy-14 clang-tidy-13 clang-tidy-12 clang-tidy-11)
|
find_program(CLANG_TIDY_TOOL NAMES clang-tidy-20 clang-tidy-19 clang-tidy-18 clang-tidy-17 clang-tidy-16 clang-tidy-15 clang-tidy-14 clang-tidy-13 clang-tidy-12 clang-tidy-11 clang-tidy)
|
||||||
execute_process(COMMAND ${CLANG_TIDY_TOOL} --version OUTPUT_VARIABLE CLANG_TIDY_TOOL_VERSION ERROR_VARIABLE CLANG_TIDY_TOOL_VERSION)
|
execute_process(COMMAND ${CLANG_TIDY_TOOL} --version OUTPUT_VARIABLE CLANG_TIDY_TOOL_VERSION ERROR_VARIABLE CLANG_TIDY_TOOL_VERSION)
|
||||||
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" CLANG_TIDY_TOOL_VERSION "${CLANG_TIDY_TOOL_VERSION}")
|
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" CLANG_TIDY_TOOL_VERSION "${CLANG_TIDY_TOOL_VERSION}")
|
||||||
message(STATUS "🔖 Clang-Tidy ${CLANG_TIDY_TOOL_VERSION} (${CLANG_TIDY_TOOL})")
|
message(STATUS "🔖 Clang-Tidy ${CLANG_TIDY_TOOL_VERSION} (${CLANG_TIDY_TOOL})")
|
||||||
|
|
||||||
message(STATUS "🔖 CMake ${CMAKE_VERSION} (${CMAKE_COMMAND})")
|
message(STATUS "🔖 CMake ${CMAKE_VERSION} (${CMAKE_COMMAND})")
|
||||||
|
|
||||||
find_program(GCC_TOOL NAMES g++-latest g++-HEAD g++ g++-16 g++-15 g++-14 g++-13 g++-12 g++-11 g++-10)
|
find_program(GCC_TOOL NAMES g++-latest g++-HEAD g++ g++-15 g++-14 g++-13 g++-12 g++-11 g++-10)
|
||||||
execute_process(COMMAND ${GCC_TOOL} --version OUTPUT_VARIABLE GCC_TOOL_VERSION ERROR_VARIABLE GCC_TOOL_VERSION)
|
execute_process(COMMAND ${GCC_TOOL} --version OUTPUT_VARIABLE GCC_TOOL_VERSION ERROR_VARIABLE GCC_TOOL_VERSION)
|
||||||
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" GCC_TOOL_VERSION "${GCC_TOOL_VERSION}")
|
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" GCC_TOOL_VERSION "${GCC_TOOL_VERSION}")
|
||||||
message(STATUS "🔖 GCC ${GCC_TOOL_VERSION} (${GCC_TOOL})")
|
message(STATUS "🔖 GCC ${GCC_TOOL_VERSION} (${GCC_TOOL})")
|
||||||
|
|
||||||
find_program(GCOV_TOOL NAMES gcov-HEAD gcov gcov-16 gcov-15 gcov-14 gcov-13 gcov-12 gcov-11 gcov-10)
|
find_program(GCOV_TOOL NAMES gcov-HEAD gcov gcov-15 gcov-14 gcov-13 gcov-12 gcov-11 gcov-10)
|
||||||
execute_process(COMMAND ${GCOV_TOOL} --version OUTPUT_VARIABLE GCOV_TOOL_VERSION ERROR_VARIABLE GCOV_TOOL_VERSION)
|
execute_process(COMMAND ${GCOV_TOOL} --version OUTPUT_VARIABLE GCOV_TOOL_VERSION ERROR_VARIABLE GCOV_TOOL_VERSION)
|
||||||
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" GCOV_TOOL_VERSION "${GCOV_TOOL_VERSION}")
|
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" GCOV_TOOL_VERSION "${GCOV_TOOL_VERSION}")
|
||||||
message(STATUS "🔖 GCOV ${GCOV_TOOL_VERSION} (${GCOV_TOOL})")
|
message(STATUS "🔖 GCOV ${GCOV_TOOL_VERSION} (${GCOV_TOOL})")
|
||||||
@@ -39,14 +40,6 @@ execute_process(COMMAND ${IWYU_TOOL} --version OUTPUT_VARIABLE IWYU_TOOL_VERSION
|
|||||||
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" IWYU_TOOL_VERSION "${IWYU_TOOL_VERSION}")
|
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" IWYU_TOOL_VERSION "${IWYU_TOOL_VERSION}")
|
||||||
message(STATUS "🔖 include-what-you-use ${IWYU_TOOL_VERSION} (${IWYU_TOOL})")
|
message(STATUS "🔖 include-what-you-use ${IWYU_TOOL_VERSION} (${IWYU_TOOL})")
|
||||||
|
|
||||||
# CMake's CXX_INCLUDE_WHAT_YOU_USE launcher runs IWYU during the normal compile step (useful to see
|
|
||||||
# diagnostics inline), but CMake's own __run_co_compile wrapper does not propagate the launched
|
|
||||||
# tool's exit code to the build, so IWYU's own "-Xiwyu --error" cannot fail that step (verified: a
|
|
||||||
# deliberately-unused #include in a header still lets `cmake --build` finish with exit code 0).
|
|
||||||
# iwyu_tool.py, which ships with IWYU, reads compile_commands.json and does return a non-zero exit
|
|
||||||
# code for any analyzed file with findings; ci_single_binaries uses it to actually fail on findings.
|
|
||||||
find_program(IWYU_TOOL_PY NAMES iwyu_tool iwyu_tool.py iwyu-tool)
|
|
||||||
|
|
||||||
find_program(INFER_TOOL NAMES infer)
|
find_program(INFER_TOOL NAMES infer)
|
||||||
execute_process(COMMAND ${INFER_TOOL} --version OUTPUT_VARIABLE INFER_TOOL_VERSION ERROR_VARIABLE INFER_TOOL_VERSION)
|
execute_process(COMMAND ${INFER_TOOL} --version OUTPUT_VARIABLE INFER_TOOL_VERSION ERROR_VARIABLE INFER_TOOL_VERSION)
|
||||||
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" INFER_TOOL_VERSION "${INFER_TOOL_VERSION}")
|
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" INFER_TOOL_VERSION "${INFER_TOOL_VERSION}")
|
||||||
@@ -62,13 +55,21 @@ execute_process(COMMAND ${NINJA_TOOL} --version OUTPUT_VARIABLE NINJA_TOOL_VERSI
|
|||||||
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" NINJA_TOOL_VERSION "${NINJA_TOOL_VERSION}")
|
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" NINJA_TOOL_VERSION "${NINJA_TOOL_VERSION}")
|
||||||
message(STATUS "🔖 Ninja ${NINJA_TOOL_VERSION} (${NINJA_TOOL})")
|
message(STATUS "🔖 Ninja ${NINJA_TOOL_VERSION} (${NINJA_TOOL})")
|
||||||
|
|
||||||
|
find_program(OCLINT_TOOL NAMES oclint-json-compilation-database)
|
||||||
|
find_program(OCLINT_VERSION_TOOL NAMES oclint)
|
||||||
|
execute_process(COMMAND ${OCLINT_VERSION_TOOL} --version OUTPUT_VARIABLE OCLINT_TOOL_VERSION ERROR_VARIABLE OCLINT_TOOL_VERSION)
|
||||||
|
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" OCLINT_TOOL_VERSION "${OCLINT_TOOL_VERSION}")
|
||||||
|
message(STATUS "🔖 OCLint ${OCLINT_TOOL_VERSION} (${OCLINT_TOOL})")
|
||||||
|
|
||||||
find_program(VALGRIND_TOOL NAMES valgrind)
|
find_program(VALGRIND_TOOL NAMES valgrind)
|
||||||
execute_process(COMMAND ${VALGRIND_TOOL} --version OUTPUT_VARIABLE VALGRIND_TOOL_VERSION ERROR_VARIABLE VALGRIND_TOOL_VERSION)
|
execute_process(COMMAND ${VALGRIND_TOOL} --version OUTPUT_VARIABLE VALGRIND_TOOL_VERSION ERROR_VARIABLE VALGRIND_TOOL_VERSION)
|
||||||
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" VALGRIND_TOOL_VERSION "${VALGRIND_TOOL_VERSION}")
|
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" VALGRIND_TOOL_VERSION "${VALGRIND_TOOL_VERSION}")
|
||||||
message(STATUS "🔖 Valgrind ${VALGRIND_TOOL_VERSION} (${VALGRIND_TOOL})")
|
message(STATUS "🔖 Valgrind ${VALGRIND_TOOL_VERSION} (${VALGRIND_TOOL})")
|
||||||
|
|
||||||
find_program(GENHTML_TOOL NAMES genhtml)
|
find_program(GENHTML_TOOL NAMES genhtml)
|
||||||
find_program(SCAN_BUILD_TOOL NAMES scan-build scan-build-22 scan-build-21 scan-build-20 scan-build-19 scan-build-18 scan-build-17 scan-build-16 scan-build-15 scan-build-14 scan-build-13 scan-build-12 scan-build-11)
|
find_program(PLOG_CONVERTER_TOOL NAMES plog-converter)
|
||||||
|
find_program(PVS_STUDIO_ANALYZER_TOOL NAMES pvs-studio-analyzer)
|
||||||
|
find_program(SCAN_BUILD_TOOL NAMES scan-build-15 scan-build-14 scan-build-13 scan-build-12 scan-build-11 scan-build)
|
||||||
|
|
||||||
# the individual source files
|
# the individual source files
|
||||||
file(GLOB_RECURSE SRC_FILES ${PROJECT_SOURCE_DIR}/include/nlohmann/*.hpp)
|
file(GLOB_RECURSE SRC_FILES ${PROJECT_SOURCE_DIR}/include/nlohmann/*.hpp)
|
||||||
@@ -127,16 +128,16 @@ foreach(CXX_STANDARD 11 14 17 20 23 26)
|
|||||||
COMMENT "Compile and test with Clang for C++${CXX_STANDARD}"
|
COMMENT "Compile and test with Clang for C++${CXX_STANDARD}"
|
||||||
)
|
)
|
||||||
|
|
||||||
# pass -stdlib=libc++ through CXXFLAGS: an explicit -DCMAKE_CXX_FLAGS would make CMake ignore CXXFLAGS
|
|
||||||
add_custom_target(ci_test_clang_libcxx_cxx${CXX_STANDARD}
|
add_custom_target(ci_test_clang_libcxx_cxx${CXX_STANDARD}
|
||||||
COMMAND CXX=${CLANG_TOOL} CXXFLAGS="${CLANG_CXXFLAGS};-stdlib=libc++" ${CMAKE_COMMAND}
|
COMMAND CXX=${CLANG_TOOL} CXXFLAGS="${CLANG_CXXFLAGS}" ${CMAKE_COMMAND}
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
||||||
-DJSON_BuildTests=ON -DJSON_FastTests=ON
|
-DJSON_BuildTests=ON -DJSON_FastTests=ON
|
||||||
-DJSON_TestStandards=${CXX_STANDARD}
|
-DJSON_TestStandards=${CXX_STANDARD}
|
||||||
|
-DCMAKE_CXX_FLAGS="-stdlib=libc++"
|
||||||
-DCMAKE_EXE_LINKER_FLAGS="-lc++abi"
|
-DCMAKE_EXE_LINKER_FLAGS="-lc++abi"
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_clang_libcxx_cxx${CXX_STANDARD}
|
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_clang_cxx${CXX_STANDARD}
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_clang_libcxx_cxx${CXX_STANDARD}
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_clang_cxx${CXX_STANDARD}
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_clang_libcxx_cxx${CXX_STANDARD} && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_clang_cxx${CXX_STANDARD} && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
||||||
COMMENT "Compile and test with Clang for C++${CXX_STANDARD} (libc++)"
|
COMMENT "Compile and test with Clang for C++${CXX_STANDARD} (libc++)"
|
||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
@@ -211,55 +212,6 @@ add_custom_target(ci_test_legacycomparison
|
|||||||
COMMENT "Compile and test with legacy discarded value comparison enabled"
|
COMMENT "Compile and test with legacy discarded value comparison enabled"
|
||||||
)
|
)
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Validate UTF-8 with simdutf.
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
add_custom_target(ci_test_simdutf
|
|
||||||
COMMAND ${CMAKE_COMMAND}
|
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
|
||||||
-DJSON_BuildTests=ON -DJSON_TestSimdutf=ON
|
|
||||||
# simdutf needs C++17, so the library falls back to its scalar validator
|
|
||||||
# below that: build the suite at C++11 to cover the fallback with the macro
|
|
||||||
# defined, and at C++17 to run every test against simdutf itself
|
|
||||||
"-DJSON_TestStandards=11\;17"
|
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_simdutf
|
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_simdutf
|
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_simdutf && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
|
||||||
COMMENT "Compile and test with simdutf UTF-8 validation enabled"
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Enable strict NUL-byte handling.
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
add_custom_target(ci_test_strict_nul_handling
|
|
||||||
COMMAND ${CMAKE_COMMAND}
|
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
|
||||||
-DJSON_BuildTests=ON -DJSON_FastTests=ON -DJSON_StrictNulHandling=ON
|
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_strict_nul_handling
|
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_strict_nul_handling
|
|
||||||
# unit-testsuites contains a fixture (a "1e308" test value) that relies on the
|
|
||||||
# legacy NUL-as-end-of-input behavior this macro disables; exclude it here, as
|
|
||||||
# it is expected to fail under strict NUL handling and is out of scope for it
|
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_strict_nul_handling && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure -E "test-testsuites"
|
|
||||||
COMMENT "Compile and test with strict NUL-byte handling enabled"
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Delete the deprecated functions.
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
add_custom_target(ci_test_delete_deprecated_functions
|
|
||||||
COMMAND ${CMAKE_COMMAND}
|
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
|
||||||
-DJSON_BuildTests=ON -DJSON_FastTests=ON -DJSON_DeleteDeprecatedFunctions=ON
|
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_delete_deprecated_functions
|
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_delete_deprecated_functions
|
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_delete_deprecated_functions && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
|
||||||
COMMENT "Compile and test with the deprecated functions deleted"
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Disable global UDLs.
|
# Disable global UDLs.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -275,96 +227,29 @@ add_custom_target(ci_test_noglobaludls
|
|||||||
COMMENT "Compile and test with global UDLs disabled"
|
COMMENT "Compile and test with global UDLs disabled"
|
||||||
)
|
)
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Disable enum serialization.
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
add_custom_target(ci_test_disableenumserialization
|
|
||||||
COMMAND ${CMAKE_COMMAND}
|
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
|
||||||
-DJSON_BuildTests=ON -DJSON_FastTests=ON -DJSON_DisableEnumSerialization=ON
|
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_disableenumserialization
|
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_disableenumserialization
|
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_disableenumserialization && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
|
||||||
COMMENT "Compile and test with enum serialization disabled"
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Disable conversion from a one-element tuple of a JSON reference.
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
add_custom_target(ci_test_disabletuplereferenceconversion
|
|
||||||
COMMAND ${CMAKE_COMMAND}
|
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
|
||||||
-DJSON_BuildTests=ON -DJSON_FastTests=ON -DJSON_DisableTupleReferenceConversion=ON
|
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_disabletuplereferenceconversion
|
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_disabletuplereferenceconversion
|
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_disabletuplereferenceconversion && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
|
||||||
COMMENT "Compile and test with tuple reference conversion disabled"
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Skip the multiple-inclusion library version check.
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
# tests/src/skip_library_version_check.cpp deliberately simulates a scenario
|
|
||||||
# (mixing two differently-versioned inclusions of the library in one
|
|
||||||
# translation unit) that unavoidably triggers the compiler's own "macro
|
|
||||||
# redefined" warning, so -- unlike the ci_test_* targets above -- it is
|
|
||||||
# compiled directly here, with a modest warning set, instead of being folded
|
|
||||||
# into the library's own -Weverything/-Werror unit test matrix.
|
|
||||||
add_custom_target(ci_test_skiplibraryversioncheck
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/skip_library_version_check
|
|
||||||
COMMAND ${CMAKE_CXX_COMPILER} -std=c++11 -Wall -Wextra
|
|
||||||
-I${PROJECT_SOURCE_DIR}/include
|
|
||||||
${PROJECT_SOURCE_DIR}/tests/src/skip_library_version_check.cpp
|
|
||||||
-o ${PROJECT_BINARY_DIR}/skip_library_version_check/skip_library_version_check
|
|
||||||
COMMAND ${PROJECT_BINARY_DIR}/skip_library_version_check/skip_library_version_check
|
|
||||||
COMMENT "Compile and run a translation unit simulating a mismatched library version, with JSON_SKIP_LIBRARY_VERSION_CHECK defined"
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Disable thread-local storage.
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
# Without thread-local storage, copying and comparing cannot bound their
|
|
||||||
# descent and handle every object and array without the call stack. Those paths
|
|
||||||
# are otherwise only reached by values nested deeper than the bound, so this
|
|
||||||
# target is what runs the whole test suite through them.
|
|
||||||
add_custom_target(ci_test_no_thread_local
|
|
||||||
COMMAND ${CMAKE_COMMAND}
|
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
|
||||||
-DJSON_BuildTests=ON
|
|
||||||
-DCMAKE_CXX_FLAGS=-DJSON_NO_THREAD_LOCAL
|
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_no_thread_local
|
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_no_thread_local
|
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_no_thread_local && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
|
||||||
COMMENT "Compile and test without thread-local storage"
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Coverage.
|
# Coverage.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
add_custom_target(ci_test_coverage
|
add_custom_target(ci_test_coverage
|
||||||
COMMAND CXX=g++ ${CMAKE_COMMAND}
|
COMMAND CXX=g++ ${CMAKE_COMMAND}
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja -DCMAKE_CXX_FLAGS="--coverage;-fprofile-arcs;-ftest-coverage;-fvar-tracking-assignments"
|
-DCMAKE_BUILD_TYPE=Debug -GNinja -DCMAKE_CXX_FLAGS="--coverage;-fprofile-arcs;-ftest-coverage"
|
||||||
-DJSON_BuildTests=ON
|
-DJSON_BuildTests=ON
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_coverage
|
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_coverage
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_coverage
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_coverage
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_coverage && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_coverage && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
||||||
|
|
||||||
COMMAND CXX=g++ ${CMAKE_COMMAND}
|
COMMAND CXX=g++ ${CMAKE_COMMAND}
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja -DCMAKE_CXX_FLAGS="-m32;--coverage;-fprofile-arcs;-ftest-coverage;-fvar-tracking-assignments"
|
-DCMAKE_BUILD_TYPE=Debug -GNinja -DCMAKE_CXX_FLAGS="-m32;--coverage;-fprofile-arcs;-ftest-coverage"
|
||||||
-DJSON_BuildTests=ON -DJSON_32bitTest=ONLY
|
-DJSON_BuildTests=ON -DJSON_32bitTest=ONLY
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_coverage32
|
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_coverage32
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_coverage32
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_coverage32
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_coverage32 && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_coverage32 && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
||||||
|
|
||||||
COMMAND ${LCOV_TOOL} --directory . --capture --output-file json.info --rc branch_coverage=1 --ignore-errors mismatch --ignore-errors unused --ignore-errors inconsistent
|
COMMAND ${LCOV_TOOL} --directory . --capture --output-file json.info --rc branch_coverage=1 --rc geninfo_unexecuted_blocks=1 --ignore-errors mismatch --ignore-errors unused
|
||||||
COMMAND ${LCOV_TOOL} -e json.info ${SRC_FILES} --output-file json.info.filtered --rc branch_coverage=1 --ignore-errors unused --ignore-errors inconsistent
|
COMMAND ${LCOV_TOOL} -e json.info ${SRC_FILES} --output-file json.info.filtered --rc branch_coverage=1 --ignore-errors unused
|
||||||
COMMAND ${CMAKE_SOURCE_DIR}/tests/thirdparty/imapdl/filterbr.py json.info.filtered > json.info.filtered.noexcept
|
COMMAND ${CMAKE_SOURCE_DIR}/tests/thirdparty/imapdl/filterbr.py json.info.filtered > json.info.filtered.noexcept
|
||||||
COMMAND ${GENHTML_TOOL} --title "JSON for Modern C++" --legend --demangle-cpp --output-directory html --show-details --branch-coverage --ignore-errors inconsistent json.info.filtered.noexcept
|
COMMAND genhtml --title "JSON for Modern C++" --legend --demangle-cpp --output-directory html --show-details --branch-coverage json.info.filtered.noexcept
|
||||||
|
|
||||||
COMMENT "Compile and test with coverage"
|
COMMENT "Compile and test with coverage"
|
||||||
)
|
)
|
||||||
@@ -373,7 +258,7 @@ add_custom_target(ci_test_coverage
|
|||||||
# Sanitizers.
|
# Sanitizers.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
set(CLANG_CXX_FLAGS_SANITIZER "-g -O1 -fsanitize=address -fsanitize=undefined -fsanitize=integer -fsanitize=nullability -fno-omit-frame-pointer -fno-sanitize-recover=all -fno-sanitize=unsigned-integer-overflow -fno-sanitize=unsigned-shift-base -fsanitize-ignorelist=${PROJECT_SOURCE_DIR}/cmake/clang_sanitizer_ignorelist.txt")
|
set(CLANG_CXX_FLAGS_SANITIZER "-g -O1 -fsanitize=address -fsanitize=undefined -fsanitize=integer -fsanitize=nullability -fno-omit-frame-pointer -fno-sanitize-recover=all -fno-sanitize=unsigned-integer-overflow -fno-sanitize=unsigned-shift-base")
|
||||||
|
|
||||||
add_custom_target(ci_test_clang_sanitizer
|
add_custom_target(ci_test_clang_sanitizer
|
||||||
COMMAND CXX=${CLANG_TOOL} CXXFLAGS=${CLANG_CXX_FLAGS_SANITIZER} ${CMAKE_COMMAND}
|
COMMAND CXX=${CLANG_TOOL} CXXFLAGS=${CLANG_CXX_FLAGS_SANITIZER} ${CMAKE_COMMAND}
|
||||||
@@ -389,30 +274,20 @@ add_custom_target(ci_test_clang_sanitizer
|
|||||||
# Check if header is amalgamated and sources are properly indented.
|
# Check if header is amalgamated and sources are properly indented.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# Same file set as .github/workflows/check_amalgamation.yml, so this CMake target (which can be run locally) is held
|
|
||||||
# to the same standard as the workflow (which runs for pull requests and for pushes to develop/master/release/*).
|
|
||||||
file(GLOB_RECURSE INDENT_FILES
|
file(GLOB_RECURSE INDENT_FILES
|
||||||
${PROJECT_SOURCE_DIR}/docs/mkdocs/docs/examples/*.hpp
|
${PROJECT_SOURCE_DIR}/include/nlohmann/*.hpp
|
||||||
${PROJECT_SOURCE_DIR}/docs/mkdocs/docs/examples/*.cpp
|
${PROJECT_SOURCE_DIR}/tests/src/*.cpp
|
||||||
${PROJECT_SOURCE_DIR}/docs/mkdocs/docs/examples/*.cu
|
${PROJECT_SOURCE_DIR}/tests/src/*.hpp
|
||||||
${PROJECT_SOURCE_DIR}/include/*.hpp
|
${PROJECT_SOURCE_DIR}/tests/benchmarks/src/benchmarks.cpp
|
||||||
${PROJECT_SOURCE_DIR}/include/*.cpp
|
${PROJECT_SOURCE_DIR}/docs/examples/*.cpp
|
||||||
${PROJECT_SOURCE_DIR}/include/*.cu
|
|
||||||
${PROJECT_SOURCE_DIR}/tests/*.hpp
|
|
||||||
${PROJECT_SOURCE_DIR}/tests/*.cpp
|
|
||||||
${PROJECT_SOURCE_DIR}/tests/*.cu
|
|
||||||
)
|
)
|
||||||
list(FILTER INDENT_FILES EXCLUDE REGEX "/tests/thirdparty/|/tests/abi/include/nlohmann/")
|
|
||||||
|
|
||||||
set(include_dir ${PROJECT_SOURCE_DIR}/single_include/nlohmann)
|
set(include_dir ${PROJECT_SOURCE_DIR}/single_include/nlohmann)
|
||||||
set(tool_dir ${PROJECT_SOURCE_DIR}/tools/amalgamate)
|
set(tool_dir ${PROJECT_SOURCE_DIR}/tools/amalgamate)
|
||||||
add_custom_target(ci_test_amalgamation
|
add_custom_target(ci_test_amalgamation
|
||||||
COMMAND rm -fr ${include_dir}/json.hpp~ ${include_dir}/json_fwd.hpp~ ${include_dir}/json_literals.hpp~ ${include_dir}/json_view.hpp~
|
COMMAND rm -fr ${include_dir}/json.hpp~ ${include_dir}/json_fwd.hpp~
|
||||||
COMMAND cp ${include_dir}/json.hpp ${include_dir}/json.hpp~
|
COMMAND cp ${include_dir}/json.hpp ${include_dir}/json.hpp~
|
||||||
COMMAND cp ${include_dir}/json_fwd.hpp ${include_dir}/json_fwd.hpp~
|
COMMAND cp ${include_dir}/json_fwd.hpp ${include_dir}/json_fwd.hpp~
|
||||||
COMMAND cp ${include_dir}/json_literals.hpp ${include_dir}/json_literals.hpp~
|
|
||||||
COMMAND cp ${include_dir}/json_view.hpp ${include_dir}/json_view.hpp~
|
|
||||||
COMMAND cp ${PROJECT_SOURCE_DIR}/BUILD.bazel ${PROJECT_SOURCE_DIR}/BUILD.bazel~
|
|
||||||
|
|
||||||
COMMAND ${Python3_EXECUTABLE} -mvenv venv_astyle
|
COMMAND ${Python3_EXECUTABLE} -mvenv venv_astyle
|
||||||
COMMAND venv_astyle/bin/pip3 --quiet install -r ${CMAKE_SOURCE_DIR}/tools/astyle/requirements.txt
|
COMMAND venv_astyle/bin/pip3 --quiet install -r ${CMAKE_SOURCE_DIR}/tools/astyle/requirements.txt
|
||||||
@@ -420,24 +295,16 @@ add_custom_target(ci_test_amalgamation
|
|||||||
|
|
||||||
COMMAND ${Python3_EXECUTABLE} ${tool_dir}/amalgamate.py -c ${tool_dir}/config_json.json -s .
|
COMMAND ${Python3_EXECUTABLE} ${tool_dir}/amalgamate.py -c ${tool_dir}/config_json.json -s .
|
||||||
COMMAND ${Python3_EXECUTABLE} ${tool_dir}/amalgamate.py -c ${tool_dir}/config_json_fwd.json -s .
|
COMMAND ${Python3_EXECUTABLE} ${tool_dir}/amalgamate.py -c ${tool_dir}/config_json_fwd.json -s .
|
||||||
COMMAND cp ${PROJECT_SOURCE_DIR}/include/nlohmann/json_literals.hpp ${include_dir}/json_literals.hpp
|
COMMAND venv_astyle/bin/astyle --project=tools/astyle/.astylerc --suffix=none ${include_dir}/json.hpp ${include_dir}/json_fwd.hpp
|
||||||
COMMAND ${Python3_EXECUTABLE} ${tool_dir}/amalgamate.py -c ${tool_dir}/config_json_view.json -s .
|
|
||||||
COMMAND venv_astyle/bin/astyle --project=tools/astyle/.astylerc --suffix=none ${include_dir}/json.hpp ${include_dir}/json_fwd.hpp ${include_dir}/json_literals.hpp ${include_dir}/json_view.hpp
|
|
||||||
COMMAND ${CMAKE_COMMAND} -P ${PROJECT_SOURCE_DIR}/cmake/scripts/gen_bazel_build_file.cmake
|
|
||||||
|
|
||||||
COMMAND diff ${include_dir}/json.hpp~ ${include_dir}/json.hpp
|
COMMAND diff ${include_dir}/json.hpp~ ${include_dir}/json.hpp
|
||||||
COMMAND diff ${include_dir}/json_fwd.hpp~ ${include_dir}/json_fwd.hpp
|
COMMAND diff ${include_dir}/json_fwd.hpp~ ${include_dir}/json_fwd.hpp
|
||||||
COMMAND diff ${include_dir}/json_literals.hpp~ ${include_dir}/json_literals.hpp
|
|
||||||
COMMAND diff ${include_dir}/json_view.hpp~ ${include_dir}/json_view.hpp
|
|
||||||
COMMAND diff ${PROJECT_SOURCE_DIR}/BUILD.bazel~ ${PROJECT_SOURCE_DIR}/BUILD.bazel
|
|
||||||
|
|
||||||
COMMAND venv_astyle/bin/astyle --project=tools/astyle/.astylerc --suffix=orig ${INDENT_FILES}
|
COMMAND venv_astyle/bin/astyle --project=tools/astyle/.astylerc --suffix=orig ${INDENT_FILES}
|
||||||
COMMAND for FILE in `find . -name '*.orig'`\; do false \; done
|
COMMAND for FILE in `find . -name '*.orig'`\; do false \; done
|
||||||
|
|
||||||
COMMAND rm -f ${include_dir}/json.hpp~ ${include_dir}/json_fwd.hpp~ ${include_dir}/json_literals.hpp~ ${include_dir}/json_view.hpp~ ${PROJECT_SOURCE_DIR}/BUILD.bazel~
|
|
||||||
|
|
||||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
COMMENT "Check amalgamation, formatting, and BUILD.bazel"
|
COMMENT "Check amalgamation and indentation"
|
||||||
)
|
)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -458,14 +325,13 @@ add_custom_target(ci_test_single_header
|
|||||||
# Valgrind.
|
# Valgrind.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# The Unicode test (~17M assertions) is too slow under Valgrind.
|
|
||||||
add_custom_target(ci_test_valgrind
|
add_custom_target(ci_test_valgrind
|
||||||
COMMAND CXX=${GCC_TOOL} ${CMAKE_COMMAND}
|
COMMAND CXX=${GCC_TOOL} ${CMAKE_COMMAND}
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
||||||
-DJSON_BuildTests=ON -DJSON_Valgrind=ON
|
-DJSON_BuildTests=ON -DJSON_Valgrind=ON
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_valgrind
|
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_valgrind
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_valgrind
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_valgrind
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_valgrind && ${CMAKE_CTEST_COMMAND} -L valgrind --exclude-regex "test-unicode" --parallel ${N} --output-on-failure
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_valgrind && ${CMAKE_CTEST_COMMAND} -L valgrind --parallel ${N} --output-on-failure
|
||||||
COMMENT "Compile and test with Valgrind"
|
COMMENT "Compile and test with Valgrind"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -473,14 +339,14 @@ add_custom_target(ci_test_valgrind
|
|||||||
# Check code with Clang Static Analyzer.
|
# Check code with Clang Static Analyzer.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
set(CLANG_ANALYZER_CHECKS "nullability.NullableDereferenced,nullability.NullablePassedToNonnull,nullability.NullableReturnedFromNonnull,optin.cplusplus.UninitializedObject,optin.cplusplus.VirtualCall,optin.performance.Padding,optin.portability.UnixAPI,security.FloatLoopCounter,security.insecureAPI.DeprecatedOrUnsafeBufferHandling,security.insecureAPI.bcmp,security.insecureAPI.bcopy,security.insecureAPI.bzero,security.insecureAPI.rand,security.insecureAPI.strcpy,valist.CopyToSelf,valist.Uninitialized,valist.Unterminated,core.CallAndMessage,core.DivideZero,core.NonNullParamChecker,core.NullDereference,core.StackAddressEscape,core.UndefinedBinaryOperatorResult,core.VLASize,core.uninitialized.ArraySubscript,core.uninitialized.Assign,core.uninitialized.Branch,core.uninitialized.CapturedBlockVariable,core.uninitialized.UndefReturn,cplusplus.InnerPointer,cplusplus.Move,cplusplus.NewDelete,cplusplus.NewDeleteLeaks,cplusplus.PlacementNew,cplusplus.PureVirtualCall,deadcode.DeadStores,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull,security.insecureAPI.UncheckedReturn,security.insecureAPI.decodeValueOfObjCType,security.insecureAPI.getpw,security.insecureAPI.gets,security.insecureAPI.mkstemp,security.insecureAPI.mktemp,security.insecureAPI.vfork,unix.API,unix.Malloc,unix.MallocSizeof,unix.MismatchedDeallocator,unix.Vfork,unix.cstring.BadSizeArg,unix.cstring.NullArg")
|
set(CLANG_ANALYZER_CHECKS "fuchsia.HandleChecker,nullability.NullableDereferenced,nullability.NullablePassedToNonnull,nullability.NullableReturnedFromNonnull,optin.cplusplus.UninitializedObject,optin.cplusplus.VirtualCall,optin.mpi.MPI-Checker,optin.osx.OSObjectCStyleCast,optin.osx.cocoa.localizability.EmptyLocalizationContextChecker,optin.osx.cocoa.localizability.NonLocalizedStringChecker,optin.performance.GCDAntipattern,optin.performance.Padding,optin.portability.UnixAPI,security.FloatLoopCounter,security.insecureAPI.DeprecatedOrUnsafeBufferHandling,security.insecureAPI.bcmp,security.insecureAPI.bcopy,security.insecureAPI.bzero,security.insecureAPI.rand,security.insecureAPI.strcpy,valist.CopyToSelf,valist.Uninitialized,valist.Unterminated,webkit.NoUncountedMemberChecker,webkit.RefCntblBaseVirtualDtor,core.CallAndMessage,core.DivideZero,core.NonNullParamChecker,core.NullDereference,core.StackAddressEscape,core.UndefinedBinaryOperatorResult,core.VLASize,core.uninitialized.ArraySubscript,core.uninitialized.Assign,core.uninitialized.Branch,core.uninitialized.CapturedBlockVariable,core.uninitialized.UndefReturn,cplusplus.InnerPointer,cplusplus.Move,cplusplus.NewDelete,cplusplus.NewDeleteLeaks,cplusplus.PlacementNew,cplusplus.PureVirtualCall,deadcode.DeadStores,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull,osx.API,osx.MIG,osx.NumberObjectConversion,osx.OSObjectRetainCount,osx.ObjCProperty,osx.SecKeychainAPI,osx.cocoa.AtSync,osx.cocoa.AutoreleaseWrite,osx.cocoa.ClassRelease,osx.cocoa.Dealloc,osx.cocoa.IncompatibleMethodTypes,osx.cocoa.Loops,osx.cocoa.MissingSuperCall,osx.cocoa.NSAutoreleasePool,osx.cocoa.NSError,osx.cocoa.NilArg,osx.cocoa.NonNilReturnValue,osx.cocoa.ObjCGenerics,osx.cocoa.RetainCount,osx.cocoa.RunLoopAutoreleaseLeak,osx.cocoa.SelfInit,osx.cocoa.SuperDealloc,osx.cocoa.UnusedIvars,osx.cocoa.VariadicMethodTypes,osx.coreFoundation.CFError,osx.coreFoundation.CFNumber,osx.coreFoundation.CFRetainRelease,osx.coreFoundation.containers.OutOfBounds,osx.coreFoundation.containers.PointerSizedValues,security.insecureAPI.UncheckedReturn,security.insecureAPI.decodeValueOfObjCType,security.insecureAPI.getpw,security.insecureAPI.gets,security.insecureAPI.mkstemp,security.insecureAPI.mktemp,security.insecureAPI.vfork,unix.API,unix.Malloc,unix.MallocSizeof,unix.MismatchedDeallocator,unix.Vfork,unix.cstring.BadSizeArg,unix.cstring.NullArg")
|
||||||
|
|
||||||
add_custom_target(ci_clang_analyze
|
add_custom_target(ci_clang_analyze
|
||||||
COMMAND CXX=${CLANG_TOOL} ${CMAKE_COMMAND}
|
COMMAND CXX=${CLANG_TOOL} ${CMAKE_COMMAND}
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
||||||
-DJSON_BuildTests=ON
|
-DJSON_BuildTests=ON
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_clang_analyze
|
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_clang_analyze
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_clang_analyze && ${SCAN_BUILD_TOOL} -enable-checker ${CLANG_ANALYZER_CHECKS} --use-c++=${CLANG_TOOL} --use-analyzer=${CLANG_TOOL} -analyze-headers --status-bugs -o ${PROJECT_BINARY_DIR}/report ninja
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_clang_analyze && ${SCAN_BUILD_TOOL} -enable-checker ${CLANG_ANALYZER_CHECKS} --use-c++=${CLANG_TOOL} -analyze-headers -o ${PROJECT_BINARY_DIR}/report ninja
|
||||||
COMMENT "Check code with Clang Analyzer"
|
COMMENT "Check code with Clang Analyzer"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -488,13 +354,6 @@ add_custom_target(ci_clang_analyze
|
|||||||
# Check code with Cppcheck.
|
# Check code with Cppcheck.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# default_defines.hpp expands the Hedley macros to the compiler's feature-test operators, which Cppcheck does not know.
|
|
||||||
# Since Cppcheck 2.20, it rejects their invocations in #if conditions instead of evaluating them as 0.
|
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/cppcheck_feature_tests.hpp "")
|
|
||||||
foreach(OPERATOR __has_attribute __has_builtin __has_cpp_attribute __has_declspec_attribute __has_extension __has_feature __has_include __has_warning)
|
|
||||||
file(APPEND ${CMAKE_BINARY_DIR}/cppcheck_feature_tests.hpp "#define ${OPERATOR}(x) 0\n")
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
add_custom_target(ci_cppcheck
|
add_custom_target(ci_cppcheck
|
||||||
COMMAND mkdir -p cppcheck
|
COMMAND mkdir -p cppcheck
|
||||||
COMMAND clang -dM -E -x c++ -std=c++11 ${CMAKE_SOURCE_DIR}/include/nlohmann/thirdparty/hedley/hedley.hpp > default_defines.hpp 2> /dev/null
|
COMMAND clang -dM -E -x c++ -std=c++11 ${CMAKE_SOURCE_DIR}/include/nlohmann/thirdparty/hedley/hedley.hpp > default_defines.hpp 2> /dev/null
|
||||||
@@ -503,7 +362,7 @@ add_custom_target(ci_cppcheck
|
|||||||
COMMAND venv_cppcheck/bin/cppcheck --enable=warning --check-level=exhaustive --inline-suppr --inconclusive --force
|
COMMAND venv_cppcheck/bin/cppcheck --enable=warning --check-level=exhaustive --inline-suppr --inconclusive --force
|
||||||
--std=c++11 ${PROJECT_SOURCE_DIR}/include/nlohmann/json.hpp -I ${CMAKE_SOURCE_DIR}/include
|
--std=c++11 ${PROJECT_SOURCE_DIR}/include/nlohmann/json.hpp -I ${CMAKE_SOURCE_DIR}/include
|
||||||
--error-exitcode=1 --relative-paths=${PROJECT_SOURCE_DIR} -j ${N} --include=default_defines.hpp
|
--error-exitcode=1 --relative-paths=${PROJECT_SOURCE_DIR} -j ${N} --include=default_defines.hpp
|
||||||
--include=${CMAKE_BINARY_DIR}/cppcheck_feature_tests.hpp --cppcheck-build-dir=cppcheck
|
--cppcheck-build-dir=cppcheck --check-level=exhaustive
|
||||||
-UJSON_CATCH_USER -UJSON_TRY_USER -UJSON_ASSERT -UJSON_INTERNAL_CATCH -UJSON_THROW
|
-UJSON_CATCH_USER -UJSON_TRY_USER -UJSON_ASSERT -UJSON_INTERNAL_CATCH -UJSON_THROW
|
||||||
-DJSON_HAS_CPP_11 -UJSON_HAS_CPP_14 -UJSON_HAS_CPP_17 -UJSON_HAS_CPP_20 -UJSON_HAS_THREE_WAY_COMPARISON
|
-DJSON_HAS_CPP_11 -UJSON_HAS_CPP_14 -UJSON_HAS_CPP_17 -UJSON_HAS_CPP_20 -UJSON_HAS_THREE_WAY_COMPARISON
|
||||||
COMMENT "Check code with Cppcheck"
|
COMMENT "Check code with Cppcheck"
|
||||||
@@ -521,6 +380,34 @@ add_custom_target(ci_cpplint
|
|||||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Check code with OCLint.
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
file(COPY ${PROJECT_SOURCE_DIR}/single_include/nlohmann/json.hpp DESTINATION ${PROJECT_BINARY_DIR}/src_single)
|
||||||
|
file(RENAME ${PROJECT_BINARY_DIR}/src_single/json.hpp ${PROJECT_BINARY_DIR}/src_single/all.cpp)
|
||||||
|
file(APPEND "${PROJECT_BINARY_DIR}/src_single/all.cpp" "\n\nint main()\n{}\n")
|
||||||
|
|
||||||
|
add_executable(single_all ${PROJECT_BINARY_DIR}/src_single/all.cpp)
|
||||||
|
target_compile_features(single_all PRIVATE cxx_std_11)
|
||||||
|
|
||||||
|
add_custom_target(ci_oclint
|
||||||
|
COMMAND ${CMAKE_COMMAND}
|
||||||
|
-DCMAKE_BUILD_TYPE=Debug
|
||||||
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||||
|
-DJSON_BuildTests=OFF -DJSON_CI=ON
|
||||||
|
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_oclint
|
||||||
|
COMMAND ${OCLINT_TOOL} -i ${PROJECT_BINARY_DIR}/build_oclint/src_single/all.cpp -p ${PROJECT_BINARY_DIR}/build_oclint --
|
||||||
|
-report-type html -enable-global-analysis --max-priority-1=0 --max-priority-2=1000 --max-priority-3=2000
|
||||||
|
--disable-rule=MultipleUnaryOperator
|
||||||
|
--disable-rule=DoubleNegative
|
||||||
|
--disable-rule=ShortVariableName
|
||||||
|
--disable-rule=GotoStatement
|
||||||
|
--disable-rule=LongLine
|
||||||
|
-o ${PROJECT_BINARY_DIR}/build_oclint/oclint_report.html
|
||||||
|
COMMENT "Check code with OCLint"
|
||||||
|
)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Check code with Clang-Tidy.
|
# Check code with Clang-Tidy.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -535,16 +422,29 @@ add_custom_target(ci_clang_tidy
|
|||||||
COMMENT "Check code with Clang-Tidy"
|
COMMENT "Check code with Clang-Tidy"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Check code with PVS-Studio Analyzer <https://www.viva64.com/en/pvs-studio/>.
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
add_custom_target(ci_pvs_studio
|
||||||
|
COMMAND CXX=${CLANG_TOOL} ${CMAKE_COMMAND}
|
||||||
|
-DCMAKE_BUILD_TYPE=Debug
|
||||||
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||||
|
-DJSON_BuildTests=ON
|
||||||
|
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_pvs_studio
|
||||||
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_pvs_studio && ${PVS_STUDIO_ANALYZER_TOOL} analyze -j 10
|
||||||
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_pvs_studio && ${PLOG_CONVERTER_TOOL} -a'GA:1,2;64:1;CS' -t fullhtml PVS-Studio.log -o pvs
|
||||||
|
COMMENT "Check code with PVS Studio"
|
||||||
|
)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Check code with Infer <https://fbinfer.com> static analyzer.
|
# Check code with Infer <https://fbinfer.com> static analyzer.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# .inferconfig (repository root) pins --fail-on-issue and the currently-triaged issue types that
|
|
||||||
# are disabled until they are addressed separately; see #5715 item 4b.
|
|
||||||
add_custom_target(ci_infer
|
add_custom_target(ci_infer
|
||||||
COMMAND mkdir -p ${PROJECT_BINARY_DIR}/build_infer
|
COMMAND mkdir -p ${PROJECT_BINARY_DIR}/build_infer
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_infer && ${INFER_TOOL} compile -- ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${PROJECT_SOURCE_DIR} -DJSON_BuildTests=ON
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_infer && ${INFER_TOOL} compile -- ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${PROJECT_SOURCE_DIR} -DJSON_BuildTests=ON
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_infer && ${INFER_TOOL} run --project-root ${PROJECT_SOURCE_DIR} -- make
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_infer && ${INFER_TOOL} run -- make
|
||||||
COMMENT "Check code with Infer"
|
COMMENT "Check code with Infer"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -554,7 +454,7 @@ add_custom_target(ci_infer
|
|||||||
|
|
||||||
add_custom_target(ci_offline_testdata
|
add_custom_target(ci_offline_testdata
|
||||||
COMMAND mkdir -p ${PROJECT_BINARY_DIR}/build_offline_testdata/test_data
|
COMMAND mkdir -p ${PROJECT_BINARY_DIR}/build_offline_testdata/test_data
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_offline_testdata/test_data && ${GIT_TOOL} clone -c advice.detachedHead=false --branch v3.2.0 https://github.com/nlohmann/json_test_data.git --quiet --depth 1
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_offline_testdata/test_data && ${GIT_TOOL} clone -c advice.detachedHead=false --branch v3.1.0 https://github.com/nlohmann/json_test_data.git --quiet --depth 1
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
||||||
-DJSON_BuildTests=ON -DJSON_FastTests=ON -DJSON_TestDataDirectory=${PROJECT_BINARY_DIR}/build_offline_testdata/test_data/json_test_data
|
-DJSON_BuildTests=ON -DJSON_FastTests=ON -DJSON_TestDataDirectory=${PROJECT_BINARY_DIR}/build_offline_testdata/test_data/json_test_data
|
||||||
@@ -600,13 +500,7 @@ add_custom_target(ci_reproducible_tests
|
|||||||
# be compiled individually.
|
# be compiled individually.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
set(iwyu_options -Xiwyu --error -Xiwyu --max_line_length=300)
|
set(iwyu_path_and_options ${IWYU_TOOL} -Xiwyu --max_line_length=300)
|
||||||
set(iwyu_path_and_options ${IWYU_TOOL} ${iwyu_options})
|
|
||||||
|
|
||||||
# CMake needs to know the exact flags used to compile each src_single/*.cpp below to hand them to
|
|
||||||
# iwyu_tool.py; JSON_CI already implies a from-scratch configure, so enabling this project-wide has
|
|
||||||
# no downside here.
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
||||||
|
|
||||||
foreach(SRC_FILE ${SRC_FILES})
|
foreach(SRC_FILE ${SRC_FILES})
|
||||||
# get relative path of the header file
|
# get relative path of the header file
|
||||||
@@ -620,56 +514,15 @@ foreach(SRC_FILE ${SRC_FILES})
|
|||||||
add_executable(single_${RELATIVE_SRC_FILE} EXCLUDE_FROM_ALL ${PROJECT_BINARY_DIR}/src_single/${RELATIVE_SRC_FILE}.cpp)
|
add_executable(single_${RELATIVE_SRC_FILE} EXCLUDE_FROM_ALL ${PROJECT_BINARY_DIR}/src_single/${RELATIVE_SRC_FILE}.cpp)
|
||||||
target_include_directories(single_${RELATIVE_SRC_FILE} PRIVATE ${PROJECT_SOURCE_DIR}/include)
|
target_include_directories(single_${RELATIVE_SRC_FILE} PRIVATE ${PROJECT_SOURCE_DIR}/include)
|
||||||
target_compile_features(single_${RELATIVE_SRC_FILE} PRIVATE cxx_std_11)
|
target_compile_features(single_${RELATIVE_SRC_FILE} PRIVATE cxx_std_11)
|
||||||
if(RELATIVE_SRC_FILE STREQUAL "json")
|
set_property(TARGET single_${RELATIVE_SRC_FILE} PROPERTY CXX_INCLUDE_WHAT_YOU_USE "${iwyu_path_and_options}")
|
||||||
# see below: report the diagnostics of json.hpp without --error, so they do not fail the build
|
# remember binary for ci_single_binaries target
|
||||||
set_property(TARGET single_${RELATIVE_SRC_FILE} PROPERTY CXX_INCLUDE_WHAT_YOU_USE ${IWYU_TOOL} -Xiwyu --max_line_length=300)
|
|
||||||
else()
|
|
||||||
set_property(TARGET single_${RELATIVE_SRC_FILE} PROPERTY CXX_INCLUDE_WHAT_YOU_USE "${iwyu_path_and_options}")
|
|
||||||
endif()
|
|
||||||
# remember binary for ci_single_binaries
|
|
||||||
list(APPEND single_binaries single_${RELATIVE_SRC_FILE})
|
list(APPEND single_binaries single_${RELATIVE_SRC_FILE})
|
||||||
# json.hpp pulls together the whole library behind heavily templated, SFINAE-based code, and
|
|
||||||
# IWYU's suggestion for its one truly ambiguous symbol (a container-comparison "swap,
|
|
||||||
# operator!=") is not deterministic between runs (observed <set>, <unordered_map>, and <map>
|
|
||||||
# for the exact same source across otherwise-identical local and containerized builds). Keep
|
|
||||||
# reporting its diagnostics (informational, via CXX_INCLUDE_WHAT_YOU_USE above) but exclude it
|
|
||||||
# from the hard gate below so a fresh IWYU/compiler combination does not fail this target on a
|
|
||||||
# nondeterministic suggestion for a header that already re-exports everything on purpose.
|
|
||||||
if(NOT RELATIVE_SRC_FILE STREQUAL "json")
|
|
||||||
list(APPEND single_binaries_tus src_single/${RELATIVE_SRC_FILE}.cpp)
|
|
||||||
endif()
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# The checks above look at each header on its own. Client code that includes only <nlohmann/json.hpp>
|
add_custom_target(ci_single_binaries
|
||||||
# must not be told by include analyzers to include another nlohmann header for what it uses
|
DEPENDS ${single_binaries}
|
||||||
# (issue #5812): json.hpp marks those includes "IWYU pragma: export", and both IWYU and clang-tidy's
|
COMMENT "Check if headers are self-contained"
|
||||||
# misc-include-cleaner (disabled in .clang-tidy for the library itself) check these clients.
|
)
|
||||||
file(GLOB CONSUMER_FILES ${PROJECT_SOURCE_DIR}/tests/iwyu_consumer/*.cpp)
|
|
||||||
foreach(CONSUMER_FILE ${CONSUMER_FILES})
|
|
||||||
get_filename_component(CONSUMER_NAME "${CONSUMER_FILE}" NAME_WE)
|
|
||||||
add_executable(iwyu_consumer_${CONSUMER_NAME} EXCLUDE_FROM_ALL ${CONSUMER_FILE})
|
|
||||||
target_include_directories(iwyu_consumer_${CONSUMER_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include)
|
|
||||||
target_compile_features(iwyu_consumer_${CONSUMER_NAME} PRIVATE cxx_std_11)
|
|
||||||
list(APPEND single_binaries iwyu_consumer_${CONSUMER_NAME})
|
|
||||||
list(APPEND single_binaries_tus ${CONSUMER_FILE})
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
if(IWYU_TOOL_PY)
|
|
||||||
add_custom_target(ci_single_binaries
|
|
||||||
DEPENDS ${single_binaries}
|
|
||||||
COMMAND ${IWYU_TOOL_PY} -p ${PROJECT_BINARY_DIR} ${single_binaries_tus} -- ${iwyu_options}
|
|
||||||
COMMAND ${CLANG_TIDY_TOOL} -p ${PROJECT_BINARY_DIR} --checks=-*,misc-include-cleaner --warnings-as-errors=* ${CONSUMER_FILES}
|
|
||||||
VERBATIM
|
|
||||||
COMMENT "Check if headers are self-contained"
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
# iwyu_tool.py (ships with IWYU, e.g. as /usr/bin/iwyu_tool on Debian/Ubuntu) was not found;
|
|
||||||
# fall back to building the self-containment check without enforcing the IWYU findings.
|
|
||||||
add_custom_target(ci_single_binaries
|
|
||||||
DEPENDS ${single_binaries}
|
|
||||||
COMMENT "Check if headers are self-contained"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Benchmarks
|
# Benchmarks
|
||||||
@@ -678,7 +531,7 @@ endif()
|
|||||||
add_custom_target(ci_benchmarks
|
add_custom_target(ci_benchmarks
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
-DCMAKE_BUILD_TYPE=Release -GNinja
|
-DCMAKE_BUILD_TYPE=Release -GNinja
|
||||||
-S${PROJECT_SOURCE_DIR}/tests/benchmarks -B${PROJECT_BINARY_DIR}/build_benchmarks
|
-S${PROJECT_SOURCE_DIR}/benchmarks -B${PROJECT_BINARY_DIR}/build_benchmarks
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_benchmarks --target json_benchmarks
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_benchmarks --target json_benchmarks
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_benchmarks && ./json_benchmarks
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_benchmarks && ./json_benchmarks
|
||||||
COMMENT "Run benchmarks"
|
COMMENT "Run benchmarks"
|
||||||
@@ -691,46 +544,21 @@ add_custom_target(ci_benchmarks
|
|||||||
# we test the project with different CMake versions:
|
# we test the project with different CMake versions:
|
||||||
# - CMake 3.5 (the earliest supported)
|
# - CMake 3.5 (the earliest supported)
|
||||||
# - CMake 3.31.6 (the latest 3.x release)
|
# - CMake 3.31.6 (the latest 3.x release)
|
||||||
# - CMake 4.0.0 (the first 4.x release)
|
# - CMake 4.0.0 (the latest release)
|
||||||
# - the CMake version running this build (usually the latest release)
|
|
||||||
|
|
||||||
function(ci_get_cmake version var)
|
function(ci_get_cmake version var)
|
||||||
set(${var} ${PROJECT_BINARY_DIR}/cmake-${version}/bin/cmake)
|
set(${var} ${PROJECT_BINARY_DIR}/cmake-${version}/bin/cmake)
|
||||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(x86_64|amd64)$")
|
add_custom_command(
|
||||||
# Kitware publishes a prebuilt Linux x86_64 archive for every release; unpacking it is far
|
OUTPUT ${${var}}
|
||||||
# cheaper than compiling all of CMake (including its own test helpers) from source.
|
COMMAND wget -nc https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}.tar.gz
|
||||||
add_custom_command(
|
COMMAND tar xfz cmake-${version}.tar.gz
|
||||||
OUTPUT ${${var}}
|
COMMAND rm cmake-${version}.tar.gz
|
||||||
COMMAND wget -nc https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-linux-x86_64.tar.gz
|
# -DCMAKE_POLICY_VERSION_MINIMUM=3.5 required to compile older CMake versions with CMake 4.0.0
|
||||||
COMMAND wget -nc https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-SHA-256.txt
|
COMMAND cmake -S cmake-${version} -B cmake-${version} -DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||||
# verify the archive against Kitware's published SHA-256 sums before unpacking it; old
|
COMMAND cmake --build cmake-${version} --parallel 10
|
||||||
# releases list the archive as "Linux-x86_64", so match case-insensitively and rewrite
|
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||||
# the name to the lowercase one the download was saved under
|
COMMENT "Download CMake ${version}"
|
||||||
COMMAND sh -c "grep -i ' cmake-${version}-linux-x86_64[.]tar[.]gz$' cmake-${version}-SHA-256.txt | tr L l | sha256sum -c -"
|
)
|
||||||
# unpack into cmake-${version} directly, as the archive's top-level directory is spelled
|
|
||||||
# "Linux" in old releases and "linux" in newer ones
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E rm -rf cmake-${version}
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory cmake-${version}
|
|
||||||
COMMAND tar xfz cmake-${version}-linux-x86_64.tar.gz -C cmake-${version} --strip-components=1
|
|
||||||
COMMAND rm cmake-${version}-linux-x86_64.tar.gz cmake-${version}-SHA-256.txt
|
|
||||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
|
||||||
COMMENT "Download prebuilt CMake ${version}"
|
|
||||||
VERBATIM
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
# no prebuilt archive for this platform (e.g. macOS or Linux aarch64): build from source
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT ${${var}}
|
|
||||||
COMMAND wget -nc https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}.tar.gz
|
|
||||||
COMMAND tar xfz cmake-${version}.tar.gz
|
|
||||||
COMMAND rm cmake-${version}.tar.gz
|
|
||||||
# -DCMAKE_POLICY_VERSION_MINIMUM=3.5 required to compile older CMake versions with CMake 4.0.0
|
|
||||||
COMMAND cmake -S cmake-${version} -B cmake-${version} -DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
|
||||||
COMMAND cmake --build cmake-${version} --parallel 10
|
|
||||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
|
||||||
COMMENT "Download and build CMake ${version} from source"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
set(${var} ${${var}} PARENT_SCOPE)
|
set(${var} ${${var}} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
@@ -740,24 +568,30 @@ ci_get_cmake(4.0.0 CMAKE_4_0_0_BINARY)
|
|||||||
|
|
||||||
# the tests require CMake 3.13 or later, so they are excluded for CMake 3.5.0
|
# the tests require CMake 3.13 or later, so they are excluded for CMake 3.5.0
|
||||||
set(JSON_CMAKE_FLAGS_3_5_0 JSON_Diagnostics JSON_Diagnostic_Positions JSON_GlobalUDLs JSON_ImplicitConversions JSON_DisableEnumSerialization
|
set(JSON_CMAKE_FLAGS_3_5_0 JSON_Diagnostics JSON_Diagnostic_Positions JSON_GlobalUDLs JSON_ImplicitConversions JSON_DisableEnumSerialization
|
||||||
JSON_DisableTupleReferenceConversion JSON_LegacyDiscardedValueComparison JSON_Install JSON_MultipleHeaders JSON_SystemInclude JSON_Valgrind
|
JSON_LegacyDiscardedValueComparison JSON_Install JSON_MultipleHeaders JSON_SystemInclude JSON_Valgrind)
|
||||||
JSON_StrictNulHandling JSON_StrictBinaryUTF8 JSON_DeleteDeprecatedFunctions)
|
set(JSON_CMAKE_FLAGS_3_31_6 JSON_BuildTests ${JSON_CMAKE_FLAGS_3_31_6})
|
||||||
set(JSON_CMAKE_FLAGS_3_31_6 JSON_BuildTests ${JSON_CMAKE_FLAGS_3_5_0})
|
|
||||||
set(JSON_CMAKE_FLAGS_4_0_0 JSON_BuildTests ${JSON_CMAKE_FLAGS_3_5_0})
|
set(JSON_CMAKE_FLAGS_4_0_0 JSON_BuildTests ${JSON_CMAKE_FLAGS_3_5_0})
|
||||||
|
|
||||||
function(ci_add_cmake_flags_targets flag min_version)
|
function(ci_add_cmake_flags_targets flag min_version)
|
||||||
string(TOLOWER "ci_cmake_flag_${flag}" flag_target)
|
string(TOLOWER "ci_cmake_flag_${flag}" flag_target)
|
||||||
string(REPLACE . _ min_version_var ${min_version})
|
string(REPLACE . _ min_version_var ${min_version})
|
||||||
set(cmake_binary ${CMAKE_${min_version_var}_BINARY})
|
set(cmake_binary ${CMAKE_${min_version_var}_BINARY})
|
||||||
|
add_custom_target(${flag_target}_${min_version}_2
|
||||||
|
COMMENT "Check CMake flag ${flag} (CMake ${CMAKE_VERSION})"
|
||||||
|
COMMAND ${CMAKE_COMMAND}
|
||||||
|
-Werror=dev
|
||||||
|
-D${flag}=ON
|
||||||
|
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_${flag_target}
|
||||||
|
)
|
||||||
add_custom_target(${flag_target}_${min_version_var}
|
add_custom_target(${flag_target}_${min_version_var}
|
||||||
COMMENT "Check CMake flag ${flag} (CMake ${min_version})"
|
COMMENT "Check CMake flag ${JSON_CMAKE_FLAG} (CMake ${min_version})"
|
||||||
COMMAND mkdir -pv ${PROJECT_BINARY_DIR}/build_${flag_target}_${min_version_var}
|
COMMAND mkdir -pv ${PROJECT_BINARY_DIR}/build_${flag_target}_${min_version_var}
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_${flag_target}_${min_version_var}
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_${flag_target}_${min_version_var}
|
||||||
&& ${cmake_binary} -Werror=dev ${PROJECT_SOURCE_DIR} -D${flag}=ON
|
&& ${cmake_binary} -Werror=dev ${PROJECT_SOURCE_DIR} -D${flag}=ON
|
||||||
DEPENDS ${cmake_binary}
|
DEPENDS ${cmake_binary}
|
||||||
)
|
)
|
||||||
list(APPEND JSON_CMAKE_FLAG_TARGETS ${flag_target}_${min_version_var})
|
list(APPEND JSON_CMAKE_FLAG_TARGETS ${JSON_CMAKE_FLAG_TARGET} ${flag_target}_${min_version_var})
|
||||||
list(APPEND JSON_CMAKE_FLAG_BUILD_DIRS ${PROJECT_BINARY_DIR}/build_${flag_target}_${min_version_var})
|
list(APPEND JSON_CMAKE_FLAG_BUILD_DIRS ${PROJECT_BINARY_DIR}/build_${flag_target} ${PROJECT_BINARY_DIR}/build_${flag_target}_${min_version_var})
|
||||||
set(JSON_CMAKE_FLAG_TARGETS ${JSON_CMAKE_FLAG_TARGETS} PARENT_SCOPE)
|
set(JSON_CMAKE_FLAG_TARGETS ${JSON_CMAKE_FLAG_TARGETS} PARENT_SCOPE)
|
||||||
set(JSON_CMAKE_FLAG_BUILD_DIRS ${JSON_CMAKE_FLAG_BUILD_DIRS} PARENT_SCOPE)
|
set(JSON_CMAKE_FLAG_BUILD_DIRS ${JSON_CMAKE_FLAG_BUILD_DIRS} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
@@ -774,20 +608,6 @@ foreach(JSON_CMAKE_FLAG ${JSON_CMAKE_FLAGS_4_0_0})
|
|||||||
ci_add_cmake_flags_targets(${JSON_CMAKE_FLAG} 4.0.0)
|
ci_add_cmake_flags_targets(${JSON_CMAKE_FLAG} 4.0.0)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# check the same flags with the CMake version running this build
|
|
||||||
foreach(JSON_CMAKE_FLAG ${JSON_CMAKE_FLAGS_4_0_0})
|
|
||||||
string(TOLOWER "ci_cmake_flag_${JSON_CMAKE_FLAG}" flag_target)
|
|
||||||
add_custom_target(${flag_target}
|
|
||||||
COMMENT "Check CMake flag ${JSON_CMAKE_FLAG} (CMake ${CMAKE_VERSION})"
|
|
||||||
COMMAND ${CMAKE_COMMAND}
|
|
||||||
-Werror=dev
|
|
||||||
-D${JSON_CMAKE_FLAG}=ON
|
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_${flag_target}
|
|
||||||
)
|
|
||||||
list(APPEND JSON_CMAKE_FLAG_TARGETS ${flag_target})
|
|
||||||
list(APPEND JSON_CMAKE_FLAG_BUILD_DIRS ${PROJECT_BINARY_DIR}/build_${flag_target})
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
add_custom_target(ci_cmake_flags
|
add_custom_target(ci_cmake_flags
|
||||||
DEPENDS ${JSON_CMAKE_FLAG_TARGETS}
|
DEPENDS ${JSON_CMAKE_FLAG_TARGETS}
|
||||||
COMMENT "Check CMake flags"
|
COMMENT "Check CMake flags"
|
||||||
@@ -797,16 +617,19 @@ add_custom_target(ci_cmake_flags
|
|||||||
# Use more installed compilers.
|
# Use more installed compilers.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
foreach(COMPILER g++-4.8 g++-4.9 g++-5 g++-6)
|
foreach(COMPILER g++-4.8 g++-4.9 g++-5 g++-6 g++-7 g++-8 g++-9 g++-10 g++-11 clang++-3.5 clang++-3.6 clang++-3.7 clang++-3.8 clang++-3.9 clang++-4.0 clang++-5.0 clang++-6.0 clang++-7 clang++-8 clang++-9 clang++-10 clang++-11 clang++-12 clang++-13 clang++-14 clang++-15 clang++-16 clang++-17 clang++-18 clang++-19 clang++-20)
|
||||||
find_program(COMPILER_TOOL NAMES ${COMPILER})
|
find_program(COMPILER_TOOL NAMES ${COMPILER})
|
||||||
if (COMPILER_TOOL)
|
if (COMPILER_TOOL)
|
||||||
|
unset(ADDITIONAL_FLAGS)
|
||||||
|
|
||||||
add_custom_target(ci_test_compiler_${COMPILER}
|
add_custom_target(ci_test_compiler_${COMPILER}
|
||||||
COMMAND CXX=${COMPILER} ${CMAKE_COMMAND}
|
COMMAND CXX=${COMPILER} ${CMAKE_COMMAND}
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
||||||
-DJSON_BuildTests=ON -DJSON_FastTests=ON
|
-DJSON_BuildTests=ON -DJSON_FastTests=ON
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_compiler_${COMPILER}
|
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_compiler_${COMPILER}
|
||||||
|
${ADDITIONAL_FLAGS}
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_compiler_${COMPILER}
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_compiler_${COMPILER}
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_compiler_${COMPILER} && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_compiler_${COMPILER} && ${CMAKE_CTEST_COMMAND} --parallel ${N} --exclude-regex "test-unicode" --output-on-failure
|
||||||
COMMENT "Compile and test with ${COMPILER}"
|
COMMENT "Compile and test with ${COMPILER}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
@@ -818,8 +641,9 @@ add_custom_target(ci_test_compiler_default
|
|||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
||||||
-DJSON_BuildTests=ON -DJSON_FastTests=ON
|
-DJSON_BuildTests=ON -DJSON_FastTests=ON
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_compiler_default
|
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_compiler_default
|
||||||
|
${ADDITIONAL_FLAGS}
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_compiler_default --parallel ${N}
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_compiler_default --parallel ${N}
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_compiler_default && ${CMAKE_CTEST_COMMAND} --parallel ${N} -LE git_required --output-on-failure
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_compiler_default && ${CMAKE_CTEST_COMMAND} --parallel ${N} --exclude-regex "test-unicode" -LE git_required --output-on-failure
|
||||||
COMMENT "Compile and test with default C++ compiler"
|
COMMENT "Compile and test with default C++ compiler"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -830,24 +654,11 @@ add_custom_target(ci_test_compiler_default
|
|||||||
add_custom_target(ci_cuda_example
|
add_custom_target(ci_cuda_example
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
||||||
|
-DCMAKE_CUDA_HOST_COMPILER=g++-8
|
||||||
-S${PROJECT_SOURCE_DIR}/tests/cuda_example -B${PROJECT_BINARY_DIR}/build_cuda_example
|
-S${PROJECT_SOURCE_DIR}/tests/cuda_example -B${PROJECT_BINARY_DIR}/build_cuda_example
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_cuda_example
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_cuda_example
|
||||||
)
|
)
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# C++ 20 modules
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
add_custom_target(ci_module_cpp20
|
|
||||||
COMMAND ${CMAKE_COMMAND}
|
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
|
||||||
-DJSON_CI=ON -DNLOHMANN_JSON_BUILD_MODULES=ON -DJSON_Install=ON
|
|
||||||
"-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}"
|
|
||||||
-S${PROJECT_SOURCE_DIR}/tests/module_cpp20 -B${PROJECT_BINARY_DIR}/ci_module_cpp20
|
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/ci_module_cpp20
|
|
||||||
VERBATIM
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Intel C++ Compiler
|
# Intel C++ Compiler
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -859,57 +670,10 @@ add_custom_target(ci_icpc
|
|||||||
-DJSON_BuildTests=ON -DJSON_FastTests=ON
|
-DJSON_BuildTests=ON -DJSON_FastTests=ON
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_icpc
|
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_icpc
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_icpc
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_icpc
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_icpc && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_icpc && ${CMAKE_CTEST_COMMAND} --parallel ${N} --exclude-regex "test-unicode" --output-on-failure
|
||||||
COMMENT "Compile and test with ICPC"
|
COMMENT "Compile and test with ICPC"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_target(ci_icpx
|
|
||||||
COMMAND ${CMAKE_COMMAND}
|
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
|
||||||
-DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
|
|
||||||
-DJSON_BuildTests=ON -DJSON_FastTests=ON
|
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_icpx
|
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_icpx
|
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_icpx && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure
|
|
||||||
COMMENT "Compile and test with ICPX (Intel oneAPI DPC++/C++)"
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# NVIDIA HPC SDK C++ Compiler
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
# nvc++ defaults to a relaxed, non-IEEE floating-point model that flushes denormals
|
|
||||||
# to zero and does not honor NaN ordering; -Kieee restores strict IEEE 754 behavior
|
|
||||||
# (needed for the dtoa/grisu and NaN-comparison code paths).
|
|
||||||
#
|
|
||||||
# -tp=px pins the target processor to the generic x86-64 baseline (SSE2-only) to avoid
|
|
||||||
# a nvc++ 25.5 / LLVM issue: when nvc++ auto-detects -tp from the runner's CPU (e.g. -tp znver4),
|
|
||||||
# certain attribute combinations trigger an llc instruction-selection crash on std::ldexp<unsigned>.
|
|
||||||
# Pinning to px removes this variability and is robust to future llc/nvc++ updates.
|
|
||||||
#
|
|
||||||
# The following tests are excluded as they trigger known nvc++ 25.5 defects (not
|
|
||||||
# library bugs); see https://github.com/nlohmann/json for tracking. Only the
|
|
||||||
# affected language-standard variants are excluded so coverage is otherwise kept:
|
|
||||||
# - test-comparison_cpp20, test-comparison_legacy_cpp20
|
|
||||||
# miscompiles cross-type/<=> comparison (e.g. `-17 <= null`)
|
|
||||||
# - test-constructor1_cpp11
|
|
||||||
# std::initializer_list lifetime bug -> SIGSEGV
|
|
||||||
# - test-deserialization_cpp20
|
|
||||||
# mangles the UTF-8 u8"" string literal in the char8_t (C++20) section
|
|
||||||
add_custom_target(ci_nvhpc
|
|
||||||
COMMAND ${CMAKE_COMMAND}
|
|
||||||
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
|
||||||
-DCMAKE_C_COMPILER=nvc -DCMAKE_CXX_COMPILER=nvc++
|
|
||||||
-DCMAKE_CXX_FLAGS="-Kieee;-tp=px"
|
|
||||||
-DJSON_BuildTests=ON -DJSON_FastTests=ON
|
|
||||||
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_nvhpc
|
|
||||||
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_nvhpc
|
|
||||||
# the pipes are escaped so the surrounding shell passes them to ctest verbatim
|
|
||||||
# instead of treating them as shell pipe operators
|
|
||||||
COMMAND cd ${PROJECT_BINARY_DIR}/build_nvhpc && ${CMAKE_CTEST_COMMAND} --parallel ${N} --exclude-regex "test-comparison_cpp20\\|test-comparison_legacy_cpp20\\|test-constructor1_cpp11\\|test-deserialization_cpp20" --output-on-failure
|
|
||||||
COMMENT "Compile and test with NVIDIA HPC SDK (nvc++)"
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# REUSE
|
# REUSE
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -939,17 +703,11 @@ add_custom_target(ci_test_build_documentation
|
|||||||
COMMENT "Build the documentation"
|
COMMENT "Build the documentation"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_target(ci_test_documentation_mermaid
|
|
||||||
COMMAND make check_mermaid
|
|
||||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/docs/mkdocs
|
|
||||||
COMMENT "Check the Mermaid diagrams of the documentation"
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Clean up all generated files.
|
# Clean up all generated files.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
add_custom_target(ci_clean
|
add_custom_target(ci_clean
|
||||||
COMMAND rm -fr ${PROJECT_BINARY_DIR}/build_* ${PROJECT_BINARY_DIR}/cmake-3.5.0 ${PROJECT_BINARY_DIR}/cmake-3.31.6 ${PROJECT_BINARY_DIR}/cmake-4.0.0 ${JSON_CMAKE_FLAG_BUILD_DIRS} ${single_binaries}
|
COMMAND rm -fr ${PROJECT_BINARY_DIR}/build_* cmake-3.5.0-Darwin64 ${JSON_CMAKE_FLAG_BUILD_DIRS} ${single_binaries}
|
||||||
COMMENT "Clean generated directories"
|
COMMENT "Clean generated directories"
|
||||||
)
|
)
|
||||||
@@ -2,16 +2,10 @@
|
|||||||
# -Wno-c++98-compat The library targets C++11.
|
# -Wno-c++98-compat The library targets C++11.
|
||||||
# -Wno-c++98-compat-pedantic The library targets C++11.
|
# -Wno-c++98-compat-pedantic The library targets C++11.
|
||||||
# -Wno-deprecated-declarations The library contains annotations for deprecated functions.
|
# -Wno-deprecated-declarations The library contains annotations for deprecated functions.
|
||||||
|
# -Wno-extra-semi-stmt The library uses assert which triggers this warning.
|
||||||
# -Wno-padded We do not care about padding warnings.
|
# -Wno-padded We do not care about padding warnings.
|
||||||
# -Wno-covered-switch-default All switches list all cases and a default case.
|
# -Wno-covered-switch-default All switches list all cases and a default case.
|
||||||
# -Wno-c2y-extensions Clang 22.1 diagnoses __COUNTER__ as a C2y extension, also in
|
# -Wno-unsafe-buffer-usage Otherwise Doctest would not compile.
|
||||||
# C++ mode. The library does not use __COUNTER__; the warnings
|
|
||||||
# all come from vendored Doctest (SECTION/TEST_CASE macros).
|
|
||||||
# -Wno-unsafe-buffer-usage Pervasive: the library's own low-level numeric/buffer code
|
|
||||||
# (to_chars, serializer, lexer, binary reader/writer, input
|
|
||||||
# adapters, json_pointer) plus vendored Doctest itself (~208
|
|
||||||
# distinct sites measured 2026-07-08 on clang trunk) all use
|
|
||||||
# raw pointer arithmetic / libc string calls by necessity.
|
|
||||||
|
|
||||||
set(CLANG_CXXFLAGS
|
set(CLANG_CXXFLAGS
|
||||||
-Werror
|
-Werror
|
||||||
@@ -19,8 +13,8 @@ set(CLANG_CXXFLAGS
|
|||||||
-Wno-c++98-compat
|
-Wno-c++98-compat
|
||||||
-Wno-c++98-compat-pedantic
|
-Wno-c++98-compat-pedantic
|
||||||
-Wno-deprecated-declarations
|
-Wno-deprecated-declarations
|
||||||
|
-Wno-extra-semi-stmt
|
||||||
-Wno-padded
|
-Wno-padded
|
||||||
-Wno-covered-switch-default
|
-Wno-covered-switch-default
|
||||||
-Wno-c2y-extensions
|
|
||||||
-Wno-unsafe-buffer-usage
|
-Wno-unsafe-buffer-usage
|
||||||
)
|
)
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# Sanitizer ignore list for ci_test_clang_sanitizer (-fsanitize-ignorelist).
|
|
||||||
#
|
|
||||||
# libstdc++ 14's <format> declares `_Scanner(basic_string_view<_CharT>, size_t __nargs = -1)`, so every std::format
|
|
||||||
# call converts -1 to size_t, which -fsanitize=integer reports as implicit-integer-sign-change. This is
|
|
||||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119429, not a bug in this library. Only that check and only <format> are
|
|
||||||
# excluded, so implicit sign changes in the library and the tests are still reported.
|
|
||||||
#
|
|
||||||
# libstdc++'s <string_view> compares two views of different lengths through `_S_compare(size_type __n1, size_type
|
|
||||||
# __n2)`, which stores `__n1 - __n2` in a signed difference_type and clamps it to int. Any comparison with a shorter
|
|
||||||
# view wraps that subtraction on purpose, and -fsanitize=integer reports it as implicit-integer-sign-change. json_view
|
|
||||||
# compares keys as string views, so the same check is excluded for <string_view> as well.
|
|
||||||
[implicit-integer-sign-change]
|
|
||||||
src:*/include/c++/*/format
|
|
||||||
src:*/include/c++/*/string_view
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* Detect used C++ Standard Library
|
|
||||||
*
|
|
||||||
* This file is compiled and run via try_run in download_test_data.cmake.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
|
|
||||||
// see https://en.cppreference.com/w/cpp/header/ciso646
|
|
||||||
#if __cplusplus >= 202002L
|
|
||||||
#include <version>
|
|
||||||
#else
|
|
||||||
#include <ciso646>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
#if defined(_LIBCPP_VERSION)
|
|
||||||
std::printf("LLVM C++ Standard Library (libc++), _LIBCPP_VERSION=%d", _LIBCPP_VERSION);
|
|
||||||
#elif defined(__GLIBCXX__)
|
|
||||||
std::printf("GNU C++ Standard Library (libstdc++), __GLIBCXX__=%d", __GLIBCXX__);
|
|
||||||
#elif defined(_MSVC_STL_VERSION)
|
|
||||||
std::printf("Microsoft C++ Standard Library (MSVC STL), _MSVC_STL_VERSION=%d", _MSVC_STL_VERSION);
|
|
||||||
#elif defined(_LIBCUDACXX_VERSION)
|
|
||||||
std::printf("NVIDIA C++ Standard Library (libcudacxx), _LIBCUDACXX_VERSION=%d", _LIBCUDACXX_VERSION);
|
|
||||||
#elif defined(EASTL_VERSION)
|
|
||||||
std::printf("Electronic Arts Standard Template Library (EASTL), EASTL_VERSION=%d", EASTL_VERSION);
|
|
||||||
#else
|
|
||||||
std::printf("unknown");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
set(JSON_TEST_DATA_URL https://github.com/nlohmann/json_test_data)
|
set(JSON_TEST_DATA_URL https://github.com/nlohmann/json_test_data)
|
||||||
set(JSON_TEST_DATA_VERSION 3.2.0)
|
set(JSON_TEST_DATA_VERSION 3.1.0)
|
||||||
|
|
||||||
include(ExternalProject)
|
|
||||||
|
|
||||||
# if variable is set, use test data from given directory rather than downloading them
|
# if variable is set, use test data from given directory rather than downloading them
|
||||||
if(JSON_TestDataDirectory)
|
if(JSON_TestDataDirectory)
|
||||||
@@ -9,40 +7,26 @@ if(JSON_TestDataDirectory)
|
|||||||
add_custom_target(download_test_data)
|
add_custom_target(download_test_data)
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/include/test_data.hpp "#define TEST_DATA_DIRECTORY \"${JSON_TestDataDirectory}\"\n")
|
file(WRITE ${CMAKE_BINARY_DIR}/include/test_data.hpp "#define TEST_DATA_DIRECTORY \"${JSON_TestDataDirectory}\"\n")
|
||||||
else()
|
else()
|
||||||
# create a header with the path to the downloaded test data
|
find_package(Git)
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/include/test_data.hpp "#define TEST_DATA_DIRECTORY \"${CMAKE_BINARY_DIR}/test_files\"\n")
|
|
||||||
|
|
||||||
# download test data from the GitHub tag source archive
|
|
||||||
ExternalProject_Add(download_test_data_project
|
|
||||||
URL "${JSON_TEST_DATA_URL}/archive/refs/tags/v${JSON_TEST_DATA_VERSION}.zip"
|
|
||||||
SOURCE_DIR "${CMAKE_BINARY_DIR}/test_files"
|
|
||||||
CONFIGURE_COMMAND ""
|
|
||||||
BUILD_COMMAND ""
|
|
||||||
INSTALL_COMMAND ""
|
|
||||||
LOG_DOWNLOAD TRUE
|
|
||||||
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
|
|
||||||
EXCLUDE_FROM_ALL TRUE
|
|
||||||
)
|
|
||||||
|
|
||||||
# target to download test data
|
# target to download test data
|
||||||
add_custom_target(download_test_data
|
add_custom_target(download_test_data
|
||||||
DEPENDS download_test_data_project
|
COMMAND test -d json_test_data || ${GIT_EXECUTABLE} clone -c advice.detachedHead=false --branch v${JSON_TEST_DATA_VERSION} ${JSON_TEST_DATA_URL}.git --quiet --depth 1
|
||||||
|
COMMENT "Downloading test data from ${JSON_TEST_DATA_URL} (v${JSON_TEST_DATA_VERSION})"
|
||||||
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
# create a header with the path to the downloaded test data
|
||||||
|
file(WRITE ${CMAKE_BINARY_DIR}/include/test_data.hpp "#define TEST_DATA_DIRECTORY \"${CMAKE_BINARY_DIR}/json_test_data\"\n")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# determine the operating system (for debug and support purposes)
|
# determine the operating system (for debug and support purposes)
|
||||||
find_program(UNAME_COMMAND uname)
|
find_program(UNAME_COMMAND uname)
|
||||||
|
find_program(VER_COMMAND ver)
|
||||||
find_program(LSB_RELEASE_COMMAND lsb_release)
|
find_program(LSB_RELEASE_COMMAND lsb_release)
|
||||||
find_program(SW_VERS_COMMAND sw_vers)
|
find_program(SW_VERS_COMMAND sw_vers)
|
||||||
set(OS_VERSION_STRINGS "${CMAKE_SYSTEM}")
|
set(OS_VERSION_STRINGS "${CMAKE_SYSTEM}")
|
||||||
if (CMAKE_HOST_WIN32)
|
if (VER_COMMAND)
|
||||||
# "ver" is a cmd.exe builtin rather than a standalone executable, so it
|
execute_process(COMMAND ${VER_COMMAND} OUTPUT_VARIABLE VER_COMMAND_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
# cannot be located with find_program and must be invoked through cmd
|
set(OS_VERSION_STRINGS "${OS_VERSION_STRINGS}; ${VER_COMMAND_RESULT}")
|
||||||
execute_process(COMMAND cmd /c ver OUTPUT_VARIABLE VER_COMMAND_RESULT ERROR_QUIET)
|
|
||||||
string(STRIP "${VER_COMMAND_RESULT}" VER_COMMAND_RESULT)
|
|
||||||
if (VER_COMMAND_RESULT)
|
|
||||||
set(OS_VERSION_STRINGS "${OS_VERSION_STRINGS}; ${VER_COMMAND_RESULT}")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
if (SW_VERS_COMMAND)
|
if (SW_VERS_COMMAND)
|
||||||
execute_process(COMMAND ${SW_VERS_COMMAND} OUTPUT_VARIABLE SW_VERS_COMMAND_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
|
execute_process(COMMAND ${SW_VERS_COMMAND} OUTPUT_VARIABLE SW_VERS_COMMAND_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
|
||||||
@@ -70,22 +54,3 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
string(REGEX REPLACE "[ ]*\n" "; " CXX_VERSION_RESULT "${CXX_VERSION_RESULT}")
|
string(REGEX REPLACE "[ ]*\n" "; " CXX_VERSION_RESULT "${CXX_VERSION_RESULT}")
|
||||||
message(STATUS "Compiler: ${CXX_VERSION_RESULT}")
|
message(STATUS "Compiler: ${CXX_VERSION_RESULT}")
|
||||||
|
|
||||||
# determine used C++ standard library (for debug and support purposes)
|
|
||||||
if(CMAKE_CROSSCOMPILING)
|
|
||||||
set(LIBCPP_VERSION_OUTPUT_CACHED "could not be detected due to cross-compiling" CACHE STRING "Detected C++ standard library version")
|
|
||||||
endif()
|
|
||||||
if(NOT DEFINED LIBCPP_VERSION_OUTPUT_CACHED)
|
|
||||||
try_run(RUN_RESULT_VAR COMPILE_RESULT_VAR
|
|
||||||
"${CMAKE_BINARY_DIR}" SOURCES "${CMAKE_CURRENT_LIST_DIR}/detect_libcpp_version.cpp"
|
|
||||||
RUN_OUTPUT_VARIABLE LIBCPP_VERSION_OUTPUT
|
|
||||||
COMPILE_OUTPUT_VARIABLE LIBCPP_VERSION_COMPILE_OUTPUT
|
|
||||||
)
|
|
||||||
if(NOT LIBCPP_VERSION_OUTPUT)
|
|
||||||
set(LIBCPP_VERSION_OUTPUT "Unknown")
|
|
||||||
message(AUTHOR_WARNING "Failed to compile cmake/detect_libcpp_version to detect the used C++ standard library. This does not affect the library or the test cases. Please still create an issue at https://github.com/nlohmann/json to investigate this.\n${LIBCPP_VERSION_COMPILE_OUTPUT}")
|
|
||||||
endif()
|
|
||||||
set(LIBCPP_VERSION_OUTPUT_CACHED "${LIBCPP_VERSION_OUTPUT}" CACHE STRING "Detected C++ standard library version")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message(STATUS "C++ standard library: ${LIBCPP_VERSION_OUTPUT_CACHED}")
|
|
||||||
+17
-42
@@ -1,13 +1,13 @@
|
|||||||
# Warning flags determined for GCC 16.2.0 with https://github.com/nlohmann/gcc_flags:
|
# Warning flags determined for GCC 14.2.0 with https://github.com/nlohmann/gcc_flags:
|
||||||
# Ignored GCC warnings:
|
# Ignored GCC warnings:
|
||||||
# -Wno-abi-tag We do not care about ABI tags.
|
# -Wno-abi-tag We do not care about ABI tags.
|
||||||
# -Wno-aggregate-return The library uses aggregate returns.
|
# -Wno-aggregate-return The library uses aggregate returns.
|
||||||
# -Wno-long-long The library uses the long long type to interface with system functions.
|
# -Wno-long-long The library uses the long long type to interface with system functions.
|
||||||
# -Wno-namespaces The library uses namespaces.
|
# -Wno-namespaces The library uses namespaces.
|
||||||
# -Wno-nrvo Doctest triggers this warning.
|
# -Wno-nrvo Doctest triggers this warning.
|
||||||
# -Wno-padded We do not care about padding warnings.
|
# -Wno-padded We do not care about padding warnings.
|
||||||
# -Wno-system-headers We do not care about warnings in system headers.
|
# -Wno-system-headers We do not care about warnings in system headers.
|
||||||
# -Wno-templates The library uses templates.
|
# -Wno-templates The library uses templates.
|
||||||
|
|
||||||
set(GCC_CXXFLAGS
|
set(GCC_CXXFLAGS
|
||||||
-pedantic
|
-pedantic
|
||||||
@@ -16,8 +16,6 @@ set(GCC_CXXFLAGS
|
|||||||
--extra-warnings
|
--extra-warnings
|
||||||
-W
|
-W
|
||||||
-WNSObject-attribute
|
-WNSObject-attribute
|
||||||
-Wabbreviated-auto-in-template-arg
|
|
||||||
-Wabi
|
|
||||||
-Wno-abi-tag
|
-Wno-abi-tag
|
||||||
-Waddress
|
-Waddress
|
||||||
-Waddress-of-packed-member
|
-Waddress-of-packed-member
|
||||||
@@ -66,9 +64,7 @@ set(GCC_CXXFLAGS
|
|||||||
-Wanalyzer-tainted-divisor
|
-Wanalyzer-tainted-divisor
|
||||||
-Wanalyzer-tainted-offset
|
-Wanalyzer-tainted-offset
|
||||||
-Wanalyzer-tainted-size
|
-Wanalyzer-tainted-size
|
||||||
-Wanalyzer-throw-of-unexpected-type
|
|
||||||
-Wanalyzer-too-complex
|
-Wanalyzer-too-complex
|
||||||
-Wanalyzer-undefined-behavior-ptrdiff
|
|
||||||
-Wanalyzer-undefined-behavior-strtok
|
-Wanalyzer-undefined-behavior-strtok
|
||||||
-Wanalyzer-unsafe-call-within-signal-handler
|
-Wanalyzer-unsafe-call-within-signal-handler
|
||||||
-Wanalyzer-use-after-free
|
-Wanalyzer-use-after-free
|
||||||
@@ -83,13 +79,10 @@ set(GCC_CXXFLAGS
|
|||||||
-Warith-conversion
|
-Warith-conversion
|
||||||
-Warray-bounds=2
|
-Warray-bounds=2
|
||||||
-Warray-compare
|
-Warray-compare
|
||||||
-Warray-parameter
|
|
||||||
-Warray-parameter=2
|
-Warray-parameter=2
|
||||||
-Wattribute-alias=2
|
-Wattribute-alias=2
|
||||||
-Wattribute-warning
|
-Wattribute-warning
|
||||||
-Wattributes
|
-Wattributes
|
||||||
-Wauto-profile
|
|
||||||
-Wbidi-chars=any
|
|
||||||
-Wbool-compare
|
-Wbool-compare
|
||||||
-Wbool-operation
|
-Wbool-operation
|
||||||
-Wbuiltin-declaration-mismatch
|
-Wbuiltin-declaration-mismatch
|
||||||
@@ -105,7 +98,6 @@ set(GCC_CXXFLAGS
|
|||||||
-Wc++20-compat
|
-Wc++20-compat
|
||||||
-Wc++20-extensions
|
-Wc++20-extensions
|
||||||
-Wc++23-extensions
|
-Wc++23-extensions
|
||||||
-Wc++26-compat
|
|
||||||
-Wc++26-extensions
|
-Wc++26-extensions
|
||||||
-Wc++2a-compat
|
-Wc++2a-compat
|
||||||
-Wcalloc-transposed-args
|
-Wcalloc-transposed-args
|
||||||
@@ -131,7 +123,6 @@ set(GCC_CXXFLAGS
|
|||||||
-Wcoverage-invalid-line-number
|
-Wcoverage-invalid-line-number
|
||||||
-Wcoverage-mismatch
|
-Wcoverage-mismatch
|
||||||
-Wcoverage-too-many-conditions
|
-Wcoverage-too-many-conditions
|
||||||
-Wcoverage-too-many-paths
|
|
||||||
-Wcpp
|
-Wcpp
|
||||||
-Wctad-maybe-unsupported
|
-Wctad-maybe-unsupported
|
||||||
-Wctor-dtor-privacy
|
-Wctor-dtor-privacy
|
||||||
@@ -139,7 +130,6 @@ set(GCC_CXXFLAGS
|
|||||||
-Wdangling-pointer=2
|
-Wdangling-pointer=2
|
||||||
-Wdangling-reference
|
-Wdangling-reference
|
||||||
-Wdate-time
|
-Wdate-time
|
||||||
-Wdefaulted-function-deleted
|
|
||||||
-Wdelete-incomplete
|
-Wdelete-incomplete
|
||||||
-Wdelete-non-virtual-dtor
|
-Wdelete-non-virtual-dtor
|
||||||
-Wdeprecated
|
-Wdeprecated
|
||||||
@@ -148,9 +138,6 @@ set(GCC_CXXFLAGS
|
|||||||
-Wdeprecated-declarations
|
-Wdeprecated-declarations
|
||||||
-Wdeprecated-enum-enum-conversion
|
-Wdeprecated-enum-enum-conversion
|
||||||
-Wdeprecated-enum-float-conversion
|
-Wdeprecated-enum-float-conversion
|
||||||
-Wdeprecated-literal-operator
|
|
||||||
-Wdeprecated-openmp
|
|
||||||
-Wdeprecated-variadic-comma-omission
|
|
||||||
-Wdisabled-optimization
|
-Wdisabled-optimization
|
||||||
-Wdiv-by-zero
|
-Wdiv-by-zero
|
||||||
-Wdouble-promotion
|
-Wdouble-promotion
|
||||||
@@ -164,13 +151,17 @@ set(GCC_CXXFLAGS
|
|||||||
-Wenum-conversion
|
-Wenum-conversion
|
||||||
-Wexceptions
|
-Wexceptions
|
||||||
-Wexpansion-to-defined
|
-Wexpansion-to-defined
|
||||||
-Wexpose-global-module-tu-local
|
|
||||||
-Wexternal-tu-local
|
|
||||||
-Wextra
|
-Wextra
|
||||||
-Wextra-semi
|
-Wextra-semi
|
||||||
-Wflex-array-member-not-at-end
|
-Wflex-array-member-not-at-end
|
||||||
-Wfloat-conversion
|
-Wfloat-conversion
|
||||||
-Wfloat-equal
|
-Wfloat-equal
|
||||||
|
-Wformat -Wformat-contains-nul
|
||||||
|
-Wformat -Wformat-extra-args
|
||||||
|
-Wformat -Wformat-nonliteral
|
||||||
|
-Wformat -Wformat-security
|
||||||
|
-Wformat -Wformat-y2k
|
||||||
|
-Wformat -Wformat-zero-length
|
||||||
-Wformat-diag
|
-Wformat-diag
|
||||||
-Wformat-overflow=2
|
-Wformat-overflow=2
|
||||||
-Wformat-signedness
|
-Wformat-signedness
|
||||||
@@ -180,7 +171,6 @@ set(GCC_CXXFLAGS
|
|||||||
-Wfree-nonheap-object
|
-Wfree-nonheap-object
|
||||||
-Wglobal-module
|
-Wglobal-module
|
||||||
-Whardened
|
-Whardened
|
||||||
-Wheader-guard
|
|
||||||
-Whsa
|
-Whsa
|
||||||
-Wif-not-aligned
|
-Wif-not-aligned
|
||||||
-Wignored-attributes
|
-Wignored-attributes
|
||||||
@@ -201,15 +191,12 @@ set(GCC_CXXFLAGS
|
|||||||
-Winvalid-offsetof
|
-Winvalid-offsetof
|
||||||
-Winvalid-pch
|
-Winvalid-pch
|
||||||
-Winvalid-utf8
|
-Winvalid-utf8
|
||||||
-Wkeyword-macro
|
|
||||||
-Wleading-whitespace=spaces
|
|
||||||
-Wliteral-suffix
|
-Wliteral-suffix
|
||||||
-Wlogical-not-parentheses
|
-Wlogical-not-parentheses
|
||||||
-Wlogical-op
|
-Wlogical-op
|
||||||
-Wno-long-long
|
-Wno-long-long
|
||||||
-Wlto-type-mismatch
|
-Wlto-type-mismatch
|
||||||
-Wmain
|
-Wmain
|
||||||
-Wmaybe-musttail-local-addr
|
|
||||||
-Wmaybe-uninitialized
|
-Wmaybe-uninitialized
|
||||||
-Wmemset-elt-size
|
-Wmemset-elt-size
|
||||||
-Wmemset-transposed-args
|
-Wmemset-transposed-args
|
||||||
@@ -228,12 +215,10 @@ set(GCC_CXXFLAGS
|
|||||||
-Wmultichar
|
-Wmultichar
|
||||||
-Wmultiple-inheritance
|
-Wmultiple-inheritance
|
||||||
-Wmultistatement-macros
|
-Wmultistatement-macros
|
||||||
-Wmusttail-local-addr
|
|
||||||
-Wno-namespaces
|
-Wno-namespaces
|
||||||
-Wnarrowing
|
-Wnarrowing
|
||||||
-Wnoexcept
|
-Wnoexcept
|
||||||
-Wnoexcept-type
|
-Wnoexcept-type
|
||||||
-Wnon-c-typedef-for-linkage
|
|
||||||
-Wnon-template-friend
|
-Wnon-template-friend
|
||||||
-Wnon-virtual-dtor
|
-Wnon-virtual-dtor
|
||||||
-Wnonnull
|
-Wnonnull
|
||||||
@@ -260,7 +245,6 @@ set(GCC_CXXFLAGS
|
|||||||
-Wpmf-conversions
|
-Wpmf-conversions
|
||||||
-Wpointer-arith
|
-Wpointer-arith
|
||||||
-Wpointer-compare
|
-Wpointer-compare
|
||||||
-Wpragma-once-outside-header
|
|
||||||
-Wpragmas
|
-Wpragmas
|
||||||
-Wprio-ctor-dtor
|
-Wprio-ctor-dtor
|
||||||
-Wpsabi
|
-Wpsabi
|
||||||
@@ -276,8 +260,6 @@ set(GCC_CXXFLAGS
|
|||||||
-Wscalar-storage-order
|
-Wscalar-storage-order
|
||||||
-Wself-move
|
-Wself-move
|
||||||
-Wsequence-point
|
-Wsequence-point
|
||||||
-Wsfinae-incomplete
|
|
||||||
-Wsfinae-incomplete=2
|
|
||||||
-Wshadow=compatible-local
|
-Wshadow=compatible-local
|
||||||
-Wshadow=global
|
-Wshadow=global
|
||||||
-Wshadow=local
|
-Wshadow=local
|
||||||
@@ -294,13 +276,10 @@ set(GCC_CXXFLAGS
|
|||||||
-Wsizeof-pointer-div
|
-Wsizeof-pointer-div
|
||||||
-Wsizeof-pointer-memaccess
|
-Wsizeof-pointer-memaccess
|
||||||
-Wstack-protector
|
-Wstack-protector
|
||||||
-Wstrict-aliasing
|
|
||||||
-Wstrict-aliasing=3
|
-Wstrict-aliasing=3
|
||||||
-Wstrict-null-sentinel
|
-Wstrict-null-sentinel
|
||||||
-Wstrict-overflow
|
-Wstrict-overflow
|
||||||
-Wstrict-overflow=5
|
|
||||||
-Wstring-compare
|
-Wstring-compare
|
||||||
-Wstringop-overflow
|
|
||||||
-Wstringop-overflow=4
|
-Wstringop-overflow=4
|
||||||
-Wstringop-overread
|
-Wstringop-overread
|
||||||
-Wstringop-truncation
|
-Wstringop-truncation
|
||||||
@@ -325,12 +304,8 @@ set(GCC_CXXFLAGS
|
|||||||
-Wsynth
|
-Wsynth
|
||||||
-Wno-system-headers
|
-Wno-system-headers
|
||||||
-Wtautological-compare
|
-Wtautological-compare
|
||||||
-Wtemplate-body
|
|
||||||
-Wtemplate-id-cdtor
|
|
||||||
-Wtemplate-names-tu-local
|
|
||||||
-Wno-templates
|
-Wno-templates
|
||||||
-Wterminate
|
-Wterminate
|
||||||
-Wtrailing-whitespace
|
|
||||||
-Wtrampolines
|
-Wtrampolines
|
||||||
-Wtrigraphs
|
-Wtrigraphs
|
||||||
-Wtrivial-auto-var-init
|
-Wtrivial-auto-var-init
|
||||||
@@ -343,8 +318,8 @@ set(GCC_CXXFLAGS
|
|||||||
-Wunreachable-code
|
-Wunreachable-code
|
||||||
-Wunsafe-loop-optimizations
|
-Wunsafe-loop-optimizations
|
||||||
-Wunused
|
-Wunused
|
||||||
-Wunused-but-set-parameter=3
|
-Wunused-but-set-parameter
|
||||||
-Wunused-but-set-variable=3
|
-Wunused-but-set-variable
|
||||||
-Wunused-const-variable=2
|
-Wunused-const-variable=2
|
||||||
-Wunused-function
|
-Wunused-function
|
||||||
-Wunused-label
|
-Wunused-label
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
# Imported target for installations made with Meson (see meson.build).
|
|
||||||
#
|
|
||||||
# CMake installations generate this file with install(EXPORT ...). Meson cannot
|
|
||||||
# do that, but as the library is header-only, the target only needs an include
|
|
||||||
# directory, the C++ standard, and the compile definitions of the options that
|
|
||||||
# differ from their defaults. Paths are computed relative to this file so that
|
|
||||||
# the installation can be relocated (e.g., into a sysroot), unless includedir or
|
|
||||||
# datadir is outside the prefix.
|
|
||||||
|
|
||||||
if(TARGET @PROJECT_NAME@::@NLOHMANN_JSON_TARGET_NAME@)
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}/@NLOHMANN_JSON_CONFIG_TO_PREFIX@" ABSOLUTE)
|
|
||||||
# As in CMake's generated file: avoid "//include" for an installation to "/".
|
|
||||||
if(_IMPORT_PREFIX STREQUAL "/")
|
|
||||||
set(_IMPORT_PREFIX "")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_library(@PROJECT_NAME@::@NLOHMANN_JSON_TARGET_NAME@ INTERFACE IMPORTED)
|
|
||||||
set_target_properties(@PROJECT_NAME@::@NLOHMANN_JSON_TARGET_NAME@ PROPERTIES
|
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "@NLOHMANN_JSON_INCLUDE_DIR@"
|
|
||||||
)
|
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.8)
|
|
||||||
set_target_properties(@PROJECT_NAME@::@NLOHMANN_JSON_TARGET_NAME@ PROPERTIES
|
|
||||||
INTERFACE_COMPILE_FEATURES cxx_range_for
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
set_target_properties(@PROJECT_NAME@::@NLOHMANN_JSON_TARGET_NAME@ PROPERTIES
|
|
||||||
INTERFACE_COMPILE_FEATURES cxx_std_11
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(_NLOHMANN_JSON_COMPILE_DEFINITIONS "@NLOHMANN_JSON_COMPILE_DEFINITIONS@")
|
|
||||||
if(_NLOHMANN_JSON_COMPILE_DEFINITIONS)
|
|
||||||
set_target_properties(@PROJECT_NAME@::@NLOHMANN_JSON_TARGET_NAME@ PROPERTIES
|
|
||||||
INTERFACE_COMPILE_DEFINITIONS "${_NLOHMANN_JSON_COMPILE_DEFINITIONS}"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
unset(_NLOHMANN_JSON_COMPILE_DEFINITIONS)
|
|
||||||
unset(_IMPORT_PREFIX)
|
|
||||||
@@ -4,4 +4,4 @@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
|||||||
Name: @PROJECT_NAME@
|
Name: @PROJECT_NAME@
|
||||||
Description: JSON for Modern C++
|
Description: JSON for Modern C++
|
||||||
Version: @PROJECT_VERSION@
|
Version: @PROJECT_VERSION@
|
||||||
Cflags: -I${includedir}@NLOHMANN_JSON_PKGCONFIG_CFLAGS@
|
Cflags: -I${includedir}
|
||||||
@@ -1 +1 @@
|
|||||||
cppcheck==1.5.3
|
cppcheck==1.5.0
|
||||||
@@ -1 +1 @@
|
|||||||
cpplint==2.0.2
|
cpplint==2.0.1
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
meson==1.12.1 \
|
|
||||||
--hash=sha256:930bc7542cbd9f57009e182fd014eba48cf1a0180a7b9006d2d32d8f168d8b02 \
|
|
||||||
--hash=sha256:ab0a6ca09f8ef70c564c8241fb5a23957886a0b53fb58412b5e07eaf07dba743
|
|
||||||
@@ -1 +1 @@
|
|||||||
reuse==6.3.0
|
reuse==5.0.2
|
||||||
@@ -1,991 +0,0 @@
|
|||||||
# Semgrep and all its dependencies, pinned by hash for the Semgrep workflow. A pip install with
|
|
||||||
# hashes must list every dependency, so this file was generated with
|
|
||||||
# uv pip compile requirements.in --generate-hashes --python-version 3.14 \
|
|
||||||
# --python-platform x86_64-manylinux_2_39 --no-header --no-annotate
|
|
||||||
# from a requirements.in containing only "semgrep==1.184.0". Dependabot keeps it current.
|
|
||||||
annotated-types==0.8.0 \
|
|
||||||
--hash=sha256:13b2beaad985e05e2d6407ee4c4f35590b11f8d693a258a561055cac8f64cab7 \
|
|
||||||
--hash=sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0
|
|
||||||
anyio==4.16.0 \
|
|
||||||
--hash=sha256:59bb03251907983d1603d27c3087ddb1e93299ea2163adcdba37899a4fb12ffb \
|
|
||||||
--hash=sha256:c66ae634e0b8228396b801741beb3294326d4b6102f7bba4041c0dfb58c29026
|
|
||||||
attrs==26.1.0 \
|
|
||||||
--hash=sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309 \
|
|
||||||
--hash=sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32
|
|
||||||
boltons==21.0.0 \
|
|
||||||
--hash=sha256:65e70a79a731a7fe6e98592ecfb5ccf2115873d01dbc576079874629e5c90f13 \
|
|
||||||
--hash=sha256:b9bb7b58b2b420bbe11a6025fdef6d3e5edc9f76a42fb467afe7ca212ef9948b
|
|
||||||
bracex==3.2.2 \
|
|
||||||
--hash=sha256:284d59c4656e5a0421ff691402074bd5847049d50410535764a2c522a47095bc \
|
|
||||||
--hash=sha256:d18976160b3ba01a57d5c53a5c8c3aa2506efa9e0a3a62467251f82b8f563fde
|
|
||||||
certifi==2026.10.23 \
|
|
||||||
--hash=sha256:a9895e6e2758b371e0545e321a3a8fd1fcfd9829ada8824a936dfb16aaaf36cd \
|
|
||||||
--hash=sha256:e9b54de76e530bb6cf0ccd036787103acb58fd42ba930ea8bf948ddbaa2f61d1
|
|
||||||
cffi==2.1.1 \
|
|
||||||
--hash=sha256:046bfc24911b37851ee1b51aab8bffe713d89c68c6a057b09484ce9fd5f69b4e \
|
|
||||||
--hash=sha256:06c72bb76605a4b0cd0aad6930b69d4baf7dd5d806cfc409b824191099700e66 \
|
|
||||||
--hash=sha256:0beceaabe56af686895136a2de78db54ecd8e4046b236b8fd6d6cb61389e9bf2 \
|
|
||||||
--hash=sha256:154852545011f779917b11c78db2358d095da62a9a172b78ad0a583ee5adc0d0 \
|
|
||||||
--hash=sha256:194cffa889098ced9976c3fc6340305e43f6303657d298da55366907c05c22d6 \
|
|
||||||
--hash=sha256:19ee6127ee34de7d83ce3d371ebc5ed91addbdcc39f9ab15ce4eb35a4e534971 \
|
|
||||||
--hash=sha256:1a18a57b58cfb21fc28d72e876acf10eaed67a1ed96226f92af4df681d571c4c \
|
|
||||||
--hash=sha256:1aa5645c30469b09530c4ebca77ebf8f17618293c58f8549cb1a543a50236e7d \
|
|
||||||
--hash=sha256:1dea0e4d7d4f11f619fe8c1d76caf49e24405b4b5743c0e3be16a500ecd930c9 \
|
|
||||||
--hash=sha256:208f941bb9d18e768138677f0a6d2ce01f590df56043dda1df1535ac57c88517 \
|
|
||||||
--hash=sha256:210019b6c7cf07f081b4c54635c8cf744377001350e29cc0f81c4377b4797735 \
|
|
||||||
--hash=sha256:246fa40ce8645a614ff682e0b70f37134e460eaf93a775e0cbe3cca585a67a80 \
|
|
||||||
--hash=sha256:25792eac27877609e7bb06d42ff88278a6624fff2ba9bbb523c09616b117e80f \
|
|
||||||
--hash=sha256:27350daa11d4f10c540e6e89dada4c54feb7256ad03e9a4dc075ebad7ba360d1 \
|
|
||||||
--hash=sha256:28907ab9bfb6aa13184cfc17c6b8e1023c5ab6fd7076d8c20a35e59fe04f8f29 \
|
|
||||||
--hash=sha256:2ae64be792b8966f2c69538199728b290e34726562896df1e5dc8ffd8d8188e8 \
|
|
||||||
--hash=sha256:31348097ff5bbe827ccc41795d4dd099d9f0625e7def00ee653c137a490c2a6c \
|
|
||||||
--hash=sha256:3143d81e29e1e20a9ce10901ec369012947876596f75a222235965f2b7ae832e \
|
|
||||||
--hash=sha256:3222ba5d678f80a030e6afbcc33dc1ae5cb45facabb61cee2c7016b8432fde48 \
|
|
||||||
--hash=sha256:3311ed60d36f83378794e1009ac6258bafbf81f7888b4caa7b35a521e3f95813 \
|
|
||||||
--hash=sha256:334644fbac4eff73d985a17a91226df55d0f394160c4cfb880e084c8f7161cac \
|
|
||||||
--hash=sha256:34e261f78cb6ceaaa36f42f2613f4380d94d9c759a9c73c769ee6e0247364632 \
|
|
||||||
--hash=sha256:363e05fa78e15116c3c32c210ee36884fd6b9afa6d440e47112c3bd511d64cb6 \
|
|
||||||
--hash=sha256:398aff33cee2767e3e781d2554c54bd0dff386bb437581e0d8011fde1a942ec1 \
|
|
||||||
--hash=sha256:3d22a20b1fb1632cc72c22f95f7b0d2961c3e1c235f245ba4c606c4771035659 \
|
|
||||||
--hash=sha256:42a494cee34437f05546455144f2b5d9ac09b1face62bcfce597d2e521066688 \
|
|
||||||
--hash=sha256:42e2f76b9455f5a9a844f770bf3e200ed3da0e15f5df3db9c31fe80b04b3d004 \
|
|
||||||
--hash=sha256:42f6930c31dc7f50732c9ae793c2786c7b6b044195967bbdde40bb9be81c4cc0 \
|
|
||||||
--hash=sha256:456a61fa52d579ebf9df2e9552ead5129855dbaff6c1e5a9b1bc408809bdc062 \
|
|
||||||
--hash=sha256:471cee653ae88de62096552e6d24ccb4a5adb8c8c9f10b5054d0122c15bf2779 \
|
|
||||||
--hash=sha256:49cbc70e6542d4ccccb936558d1064a8012541e78f821f955cff24e357776c94 \
|
|
||||||
--hash=sha256:4a7c934f7360e8cd64fe9efadcbd10c7c6364f531e432b9a4bf5ccbc9e0e8b50 \
|
|
||||||
--hash=sha256:4be96343e422f2dfcd12ab5c9f5aebe03f82f737c6bffeca6830b3875cb44aab \
|
|
||||||
--hash=sha256:4f42141fc14250de6dde5ee7ea4432be017252d91f19c5ad043c084cea629cac \
|
|
||||||
--hash=sha256:507a24c282e0f42f8ed737cf048572cbf580468da5555764a8331735e9c736b6 \
|
|
||||||
--hash=sha256:51b31d1c98274844cfd7838ce00bfc27c7423a4dc00fc0772fc3331c2cc90676 \
|
|
||||||
--hash=sha256:58acb8ab8e295e6c5ea12f888cbb13cf21511ef2a3303a23f4325c29d17fe5c1 \
|
|
||||||
--hash=sha256:5a59cc1c4442bc3d5c703bf720b51138d0bfc173618807c9ee2490a7541dd3d9 \
|
|
||||||
--hash=sha256:5bb4e7ea95dcd6a014a6fef62e62467d67d8e582326443f3d68e71d6320a9fcf \
|
|
||||||
--hash=sha256:5c58fe613dc5e5336357eff555824a314d8e43282600435c8d1cb6a7a2fedd13 \
|
|
||||||
--hash=sha256:5e7cecbaadb83884793e05828cee59b210b24583b9c7425d0ba6a754fe22eb4e \
|
|
||||||
--hash=sha256:616f097f2fe415bc92a247f02e11f634e1f9e9a83d327e3c915c15089c87869e \
|
|
||||||
--hash=sha256:63bbfd5ded17c4840ac07cd8f1c21ba9d9708141f840b324f422f41b207e3973 \
|
|
||||||
--hash=sha256:64faea20f4e2613363a1a9b9c7dd73058f3ecd00133a511e72ad7c511658f527 \
|
|
||||||
--hash=sha256:661c298b4821edebead0c91edd2b00374d67ad7c5a1f7a91d4442633b79d6a72 \
|
|
||||||
--hash=sha256:68e62fe11f30d5ca8289242866f0a5291402d8529ca2178ab8afc5c9694ae890 \
|
|
||||||
--hash=sha256:6a8dddef476fab96d066d578fc88526767b836ab5ab21754e1d5bf3879c31c7c \
|
|
||||||
--hash=sha256:6e192623c49c94421616a5778fba35cf0d5a8d000650c1967ef4448ee5cdd990 \
|
|
||||||
--hash=sha256:7225e4514edb64eb6740324353e0da0711954fd8d7da4576755b1c6e09b697cd \
|
|
||||||
--hash=sha256:75f80557d1389eddbd0de2681f6a390a0c5338c31ddaa821381c203fc3fd50d9 \
|
|
||||||
--hash=sha256:770de9db11e84213beec501cfcaa013b019820ca881e03344dea5844f7876d94 \
|
|
||||||
--hash=sha256:7750c6449dff7864bb9bb27ddfb0267756189201a3afc911d82b3caacd70dfc3 \
|
|
||||||
--hash=sha256:7bde5e4cc5c10140859842b9d383af292b22639a4dffb725314baf45968cef80 \
|
|
||||||
--hash=sha256:7ce713ace7c0e4520535b42b77eaa742c16dab813978064913e5a3cf82973b41 \
|
|
||||||
--hash=sha256:7da0c5eff80f0197f3b3d1232ec5a682a9325f4ae9016a78f5f5ca35f9ced1f5 \
|
|
||||||
--hash=sha256:7dbb61fe3a7699468030f71bbe5f8a0e326a151daa91beb11a6fc1f980c55e1c \
|
|
||||||
--hash=sha256:811bd1e21d32de12efca32393a0ab3f5133b54fce9bd44b8bd77ab07da14bf6a \
|
|
||||||
--hash=sha256:8ef53b2de9bcb9197d31854256575d59dbac0cba72ac627bb291ef5eceb74be4 \
|
|
||||||
--hash=sha256:937c0052c05a31ca1daf18de3158eed4dbfcb9cc107adbea227728d647be701e \
|
|
||||||
--hash=sha256:9d2055050ea716bd38b7f7f1579c275386646b4894c155a3e2f3cd62ed41b7c6 \
|
|
||||||
--hash=sha256:9f8d177621de5cb38ee3e731eda45d421db093ec0739f46a5594babda7987a98 \
|
|
||||||
--hash=sha256:a2d7755bef5a12ed488f4ef1f1b69ee9191d7396083b755a5d2295f6edb4768b \
|
|
||||||
--hash=sha256:a48d62ab9d6f4f98c983223a547af44be6ca3691074c31cecced6facd3ba2dc1 \
|
|
||||||
--hash=sha256:a4f00aa42f75d6e4595e8866e748cc1705adc0cddfeb2ca86d0d03993d63ba03 \
|
|
||||||
--hash=sha256:a6e721d4b0e45d5b65e87534470e67b18dcd092c83f68fba09f152b9cbc061af \
|
|
||||||
--hash=sha256:a730a083190634c65cca36ba5f489531576ebd79bcd5c8e172130f6453127231 \
|
|
||||||
--hash=sha256:a931079504ecc49efed7744c476a5c343a92fabf66dec2db95edb1b2fdc770e2 \
|
|
||||||
--hash=sha256:aa9511c62d14da7aacc9b4bf51f3f697a621e83b2d6919008243c3aad168eea3 \
|
|
||||||
--hash=sha256:ab36d55f9ed2d067327667c2fea18dda018eb628dd6347aa01dda6cf1f5d3836 \
|
|
||||||
--hash=sha256:ad2c86c495b899d862ea0f4b42891b8713a3bd45dd4105c7fd51c2a72f39f3a5 \
|
|
||||||
--hash=sha256:aeae0e330c9f6acd681f647d46cefd30c29f93e3392882e792e82080c9691399 \
|
|
||||||
--hash=sha256:b0431303acaea1089ad4b3e9ce4e6518193def1118d4073ca848635ee4ea2e96 \
|
|
||||||
--hash=sha256:b5bdfd1c873d4e093aabc0ca84c4ca6dbc4f752afb5c86f146d9742580c9da2e \
|
|
||||||
--hash=sha256:baed1e86cc735622097354b9d1281406caf42ff42a886d29faa8e8d1630333be \
|
|
||||||
--hash=sha256:c1453022f490d2459a11819d83ad1d586e9ff65a12ac3e705ffebd46d3685dcf \
|
|
||||||
--hash=sha256:c26608d2222fb1e94487e4a387d85f13eb55d5ed725cb25a0c589ac4ee60e7bc \
|
|
||||||
--hash=sha256:c7659f22557c5a0bc4855cd635f55edec690cc008a40768527762cb9fb263455 \
|
|
||||||
--hash=sha256:c8c69575568085ba0b1b10c0249d779a214aea6f6522e949a0fc9fb0fcb449d0 \
|
|
||||||
--hash=sha256:c8d2c9fd1f2d16f780d15127abb050d13d1a76c03a4bd87d7e4980e45e511e12 \
|
|
||||||
--hash=sha256:ca82be1a1d406ecfe1d25dc16cb33488e5a16bf4438c9fb590484ea29d92478b \
|
|
||||||
--hash=sha256:cc572dace3f60ef98d7b12ff411d20f5362feb31a0439eab0085bbfd349982d7 \
|
|
||||||
--hash=sha256:d18e5ac0f2f03f4f518d3e23db0f0cad7faa1da8620e9c09461d443bbf6e6692 \
|
|
||||||
--hash=sha256:d28630f5854ab07ab1fd4aba756de52326c82e6be15d414b12793f1975048b54 \
|
|
||||||
--hash=sha256:d9c275eaacd24aa73f94ffd6de08fc3f932424d8b6c376f4bed7cde376fe7bc3 \
|
|
||||||
--hash=sha256:da0e573f9f97159390c89d9f1a9e41908b66d408cc5b58d08cf3847d844c531b \
|
|
||||||
--hash=sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be \
|
|
||||||
--hash=sha256:dddad92b554513a31f272570678ba307fb9f618f05e3d4a5eacafff9eae03e1d \
|
|
||||||
--hash=sha256:df423d40ee8654634421812bc3b196da3f9bd7d32929da813f8394c4348a5358 \
|
|
||||||
--hash=sha256:df913725b79db7bcf03448f36b7bf8815363417d5b58deecf9305e3e30f0f21a \
|
|
||||||
--hash=sha256:e0bcb7e0f677f543555d2adff3bf19c05f66cdb4796e5ff602442ab2fe3c4ef7 \
|
|
||||||
--hash=sha256:e2d65b31f36619cda3999b78b2aa9632e76b78448e7a56fc4240824200e7c4fc \
|
|
||||||
--hash=sha256:e6e8cff14d6fb0be70a09c0bdc58096f501952d04624ebf867e0e56da2df8960 \
|
|
||||||
--hash=sha256:f16c709686a78c727bbbf059f92b0bf41c6fc60deec706d2dc19f529175a6125 \
|
|
||||||
--hash=sha256:f24fb43132a4c6b4cb4eb029492919b2db645be6808d738f244fd146c03c32cb \
|
|
||||||
--hash=sha256:f53e442b08449d42821fa4a4fba000095af9f62742a500f978a9f557ec44339a \
|
|
||||||
--hash=sha256:f5cfbc5fe74540d335175b656c725d74d90e3730c626d92575eea35029d9afaa \
|
|
||||||
--hash=sha256:f81b3b8f3d4e343550fa4baa0e479bba9f2d29ce9c2e9b51d1ce1718d7442fcf \
|
|
||||||
--hash=sha256:f8ec5e643a9a937f64e1999eb9f75d072263751912dc5cd06d3c85f8f44be7c3 \
|
|
||||||
--hash=sha256:fb92203a88b3d3053034db775110081c49d28be6551923805e039924093761e4 \
|
|
||||||
--hash=sha256:fcd22650c908d7b7da162bbfaab594a1227a15d1643a98c68b122ac642fa2264
|
|
||||||
charset-normalizer==3.5.2 \
|
|
||||||
--hash=sha256:01077390b03f7988f11d700a2194e69b119741a86b1a638b1db88891e3eced8e \
|
|
||||||
--hash=sha256:01b0c0d2262a9e28e8484a278c7e1b5d650e3ac8cf2683d2967e25899f208bdf \
|
|
||||||
--hash=sha256:04851f73ae72b8413dddadb16a49dfee95263553741fd42d546f7d66907e6be5 \
|
|
||||||
--hash=sha256:0521c5665880b33d603717defa76c094048900010897909952397feb3039da56 \
|
|
||||||
--hash=sha256:0774bf9bf620249fee3e0b8b9fd3065de213be30f3aa94ce2494b3b638949e26 \
|
|
||||||
--hash=sha256:0891b9d3903c5571c03771ca669a4b0ec5618ca722a5c957d3d29cd4e5062848 \
|
|
||||||
--hash=sha256:0c951d5e6dd9c2ff60609476752bee49da4206adde960ebc247766937f72e718 \
|
|
||||||
--hash=sha256:0fed1d06615f022ee3b13caf5e8b180cfea32bb2c5aded8a9d44277afc040f93 \
|
|
||||||
--hash=sha256:114e4d0c92d618409ed82a99e22b5c5e768fe995f2973f78265f4524f49d4640 \
|
|
||||||
--hash=sha256:11912e4bb14baae7c5d8791aa55ba0a3a03ec6729073307b0f57270abaa713d3 \
|
|
||||||
--hash=sha256:11a4d68a6ecda3292cb1e50239e111543ba5d709bb62a6b4ea1afcfa729d8875 \
|
|
||||||
--hash=sha256:124fbf1a8ff966d87ae05bb8bd45a71f966055ed8bba320d0c7cf450bc5f4d0e \
|
|
||||||
--hash=sha256:1461ac396c4fdb983a675f20aa555624f0ee18ac83d832b9244ffff3d8055275 \
|
|
||||||
--hash=sha256:1503bccbeb36d5527790c3930327704c39af22de3112f1b1666a9f3ce15ee204 \
|
|
||||||
--hash=sha256:15bb4005af6320d259dc7593ca84a38d7fe06a421dbcf7b910ae23979101e787 \
|
|
||||||
--hash=sha256:15c44f7edfd477b06f517a5cc317fc1707edb9de2c865f43d4b6513907473234 \
|
|
||||||
--hash=sha256:16fa0eccf81304b79c5cd87f9271c3b85dd9dd99245e4422ae9c0dd45e0f99d3 \
|
|
||||||
--hash=sha256:183b88127acdb4fabe59d951ab424faf1af7b63cdbb5f776186c1ea2ffcaed98 \
|
|
||||||
--hash=sha256:195c26fb65950f8fce54e26349852b7bdd7c5f120aeefbcc440b8a20faaed4a3 \
|
|
||||||
--hash=sha256:1afb975bd5d68d5ce9f6b6d44fdf2f7e34b895a35e95708a7a91b20a3b51d187 \
|
|
||||||
--hash=sha256:1b4cbc7c3491ccb4aa17fcd8165649d01cf39f76de1696da8631b5f71b85401d \
|
|
||||||
--hash=sha256:1bc0baf5ef96b6ede57d47f4b8fe4d9d84019c3bfcbeb20a41edc6a6ee341f1f \
|
|
||||||
--hash=sha256:1c50fe28bbc2ced33386f298650d91218076c05420e6cbd790b913adc41659e7 \
|
|
||||||
--hash=sha256:1db38f4c5496827c1a501846d64d14c3b80c7e6714e406cd7dc36a9899fa1011 \
|
|
||||||
--hash=sha256:211d5a3eb6af8f513b8d4ca19a8c1b7accab1b5f0d3175f9826b03c1a920dc1f \
|
|
||||||
--hash=sha256:23851fb4e1b85ed3f6c2a27b777cdfe2e19fb5b38429a8faf38c7542b7665869 \
|
|
||||||
--hash=sha256:254eb48b9fa5ee9898a3c445825a1f340fe53712a098904b39b0bddba8ea3cb1 \
|
|
||||||
--hash=sha256:2625388c6c754520c37abaf3b41eb34d1cc4a373f457898f08606c8e362b891d \
|
|
||||||
--hash=sha256:281cb91036248400f4cc957495cccd44c275c2e0c5854f7e45ac5cf7dc193847 \
|
|
||||||
--hash=sha256:28a15fdad492a99b6eccfaaed66ef3f74050680545ea61ec8b2f4c538f1f1320 \
|
|
||||||
--hash=sha256:28b4f0d66fb834ff90f28209ac7bce77868c45d8c93e26f906709d9b7c2e1af9 \
|
|
||||||
--hash=sha256:2a925889534b3748302dae5dead07cc13480de1dac3aea80a941b729b471ef93 \
|
|
||||||
--hash=sha256:2b7b3bbfb4fe8ef40600792d762fbaa9057559f9d3fad209525b7a22b99e91fd \
|
|
||||||
--hash=sha256:2c9ad19a6cfcd5ea5c0d41161d22f9df1dcc277e9bef2751391334546a314c00 \
|
|
||||||
--hash=sha256:2cc961b171b3f3440f410489ab3573e86aea8736134ebbb40ea1338b7f0831bc \
|
|
||||||
--hash=sha256:2ce45c6627b22c47e390bc91a41c3d13032192e699fa0bea96e9671b373d69b0 \
|
|
||||||
--hash=sha256:2e06a3a98f916dd41d27f3105e02e7a40181c98c94b9158733d03a6f80506c09 \
|
|
||||||
--hash=sha256:304d5463e65a35d7bb0850550e0780395395f6fcf452f04db7d5ca7cecc425ac \
|
|
||||||
--hash=sha256:304d8e4d493af723536393eee0c689eb7813f4a474c8b479dee63f1fdd98f621 \
|
|
||||||
--hash=sha256:30fcd120b732aa79317f08dee04d7de0847822e4cf7ee0e9f445bb958832252c \
|
|
||||||
--hash=sha256:31f3930700408d211f13378ccbe1c40845d8da54bd0681fac3a9b5aae81c7aa8 \
|
|
||||||
--hash=sha256:34276fd796040bf0993ab33a369aa572e6979c7aab225a88893667ad8eac8f7a \
|
|
||||||
--hash=sha256:355ad8011081dec5412240c087a9a0c9d4d5039f3ed11a3f13e18c2b29b56c51 \
|
|
||||||
--hash=sha256:38a873987f3be698494da8b2e3085e29da02da7b633dce73e79c699a113d7bf0 \
|
|
||||||
--hash=sha256:39de2a259fc954455c57274dc94c79d5842774e1247a016aff30bc0efed0f4ef \
|
|
||||||
--hash=sha256:3d14b50de6bf4d0edf857a9386836846f982b8f524e188e2e68b96d702bcf4aa \
|
|
||||||
--hash=sha256:3d21b8b13c7592db2ac5e544a6d83187b995257472b0c9e8351b6d507ae37ed6 \
|
|
||||||
--hash=sha256:3d31298449090ab8d47b7b1b2a555ff73cac7ed438a08b7ac160980c7ebed649 \
|
|
||||||
--hash=sha256:3ddacd27458c45bdacd6bd6db644bfb730efbf9e830310186e3045c9c5be8fb2 \
|
|
||||||
--hash=sha256:3df041de8887954562c9b261cba85ca0e9ded74048daf125f45edcfaa4832229 \
|
|
||||||
--hash=sha256:40ab6bffa02ae10a0581e6c198be7d2d8ca5c2a0c64e4ed3465d766df457573e \
|
|
||||||
--hash=sha256:4275811936e2f06feff5e598fb42a1b7ae852da8e39605211892b56b81a34efd \
|
|
||||||
--hash=sha256:443eae2bf318abeaf6f15d785138f71fd6de770e99a92158b8b814265e079115 \
|
|
||||||
--hash=sha256:447441e76ec720b15e64418d32e092297340387053047c7c694f579efb0ee1d9 \
|
|
||||||
--hash=sha256:4495c5002a7b28557e7e222e77e0b661183e432b7d6d2e788101e3f240e05b8c \
|
|
||||||
--hash=sha256:44bd4fbb29dfbeba60e7d2bd000c59e4b21ddb3cc53912b14048d37092706d7c \
|
|
||||||
--hash=sha256:4685902cf26edf013ed7a3da0f426ebba7a00ebb9541386d835afbf002c11cab \
|
|
||||||
--hash=sha256:498dc3188ca05a68231ac3fdbfc7f57eb67e1343c30e0fea17f8218c1599b253 \
|
|
||||||
--hash=sha256:4c2b5031f63e331e3839b40aed2dd6f191e9c07edbde303e7876846ea1946995 \
|
|
||||||
--hash=sha256:4d48f2d08b9de5864e2c8744d4461b862fb149a18274abc8b698c45975573438 \
|
|
||||||
--hash=sha256:4f87960d57feabfb618e4e0af6e7371645fa26a277860739d6e5d6e0012c92f0 \
|
|
||||||
--hash=sha256:50e3adfb96fc189eb27b1cf62d3b598b89b4bb0420d93a3d3e42e137409011be \
|
|
||||||
--hash=sha256:51cf45226a9b588d0d2b4880c62d686934b63ab0bd79ca23ab0e9762eb27441b \
|
|
||||||
--hash=sha256:52aa6992700996af31f375de0c6bacd402b0097fe40b53c426b9f51a90ebabc7 \
|
|
||||||
--hash=sha256:55ea99acb17b9325618de155a0cd6a2e8f5d10be008113e1d433bbb58db543b2 \
|
|
||||||
--hash=sha256:56bc200a365efb37383b7852e4cc5898d3b2da5987289b543956cf8cad71018a \
|
|
||||||
--hash=sha256:588461c2e8384d309bd63e5826019b6977bc66d629b99ac8737bb795d7b2cb5a \
|
|
||||||
--hash=sha256:58ca3755ee7ff7f59b57789ec9833c9de9ea275405cdd240eda1f193112e398a \
|
|
||||||
--hash=sha256:58f361dcbab699cf8f42db3f47c8e7fd1036f138c23a5d08de9fde5f425a730c \
|
|
||||||
--hash=sha256:598a11a2c7ebaa5334bf698bf29568c9c390abac6a154d8170fedecd1cea38c5 \
|
|
||||||
--hash=sha256:59f63901b0031c3136cf64704dcb21de0bbae62ce2c9529bc39d27665463de37 \
|
|
||||||
--hash=sha256:5cde776b7cc66e4f6c99612cea4aa7269aa65863f7a15841b2c264f103822f4e \
|
|
||||||
--hash=sha256:5e2b6b57e9733d39f0c9fd3185efa6b8e29652c4cd8fe94180272cf6ed9a78c4 \
|
|
||||||
--hash=sha256:5fb29fb8cd1a46c27a1bf9613ad5ec2599310d46b4025d9556404a6b6a292800 \
|
|
||||||
--hash=sha256:6045373d5a89a5ec71afde535db987ca28e76dfa276c2d4c818265b375d4b055 \
|
|
||||||
--hash=sha256:619799369eeef6366ed3e8755a5670f4f2f0fb6b30a0fd7264dc0fdc2357058e \
|
|
||||||
--hash=sha256:62588a277bfb59def052abd940703fa35107152bf479781a878617d60faf8fb5 \
|
|
||||||
--hash=sha256:62603db9a7caa0802eaa28c1c46fecd7b3a263a774069c24c3c28c302448721c \
|
|
||||||
--hash=sha256:65cd72beeeca9d3aaea1201e5923859f308f952f9c71de93f06063c79f0f7a3b \
|
|
||||||
--hash=sha256:68eb192d85ab8e5f6ec69c2bc6ac0179fbf04a5ac1569d12fbef74883fe102d0 \
|
|
||||||
--hash=sha256:6bd128f206a7752ae1f2ab6c61bf8a24ba28913a10df8b14c2637b973ff97a80 \
|
|
||||||
--hash=sha256:6be488a102b8cf28d0391d8c4ba7748938ae28b78ad901f8585520fca33ead1a \
|
|
||||||
--hash=sha256:7218e8f32b0956cfcd048fd42d9d5779809745ca1d86113ca56f66e7ae1549c4 \
|
|
||||||
--hash=sha256:7441d755b7ab94f8d4eb3e43ec05482d760842fd263d003a99102d742cd835e2 \
|
|
||||||
--hash=sha256:749e97e1b32313717a565abbe321bc2190bc8b35f1a67e4cdbc7c56c8d8ffe58 \
|
|
||||||
--hash=sha256:75a3ceed0724d625d64b86ca20aba182e4df462e04c2414fc941c0f523f06aac \
|
|
||||||
--hash=sha256:780fbe7cab297b81dad9fb8dc5eb003c0468ffb0d9e5f65068c53a34661a96bc \
|
|
||||||
--hash=sha256:78456a747de8dc58360ffa581f30a002baf5aa28cb262536545e91f113ed7639 \
|
|
||||||
--hash=sha256:7967d08cf06dee78443b874f98c98036f624f3a4e73e11f9f64f5be4d25393cf \
|
|
||||||
--hash=sha256:7a881931aa470808df94a8c380eed2bbbc76cd9dc622310f99665658c821eb6d \
|
|
||||||
--hash=sha256:7dcd882da75ef9adf94903b1e3b9419e8aa8fb4c7396822b834b9ef7fb96954f \
|
|
||||||
--hash=sha256:7e841fb9010836c992c9f12fcbd43a831de93a5f726fc1ccd8ca1d0268c5014c \
|
|
||||||
--hash=sha256:7fdde2c9fd9e3eca40631e024664cf2584272cc8f96308cbe5fdfc930f51d8bc \
|
|
||||||
--hash=sha256:8024d00c3faf3fc0c16e07a69f4405e8eac7cc0ab15f65fe6cf43827c4cf72b4 \
|
|
||||||
--hash=sha256:80d02b6f04e92601a081dd97b23d3128033098bff5d35d392ddcc0476ea11253 \
|
|
||||||
--hash=sha256:838dcc90063569a0448120554591a1d6c4a4ffe11babf048908793154ab86ade \
|
|
||||||
--hash=sha256:849df64e889b2e17230d58410a03dba311a65b163508fd33679b2b737d4b7858 \
|
|
||||||
--hash=sha256:87475fabc8d9996fd9c27debb395e642e8c838d78a00b6e932227a0e06b81e26 \
|
|
||||||
--hash=sha256:87e50a3e7cb90af586b6c5faf23e302a970415ac73bd7bd90a515a04b427ef96 \
|
|
||||||
--hash=sha256:89b53f3cda69831909888e0494f4fa0bcd3537e3e138dabeb620bd6ad946bae8 \
|
|
||||||
--hash=sha256:8a893cc101149f80a653f82062ebc95b34525a2614382e1da5458fe7c6997249 \
|
|
||||||
--hash=sha256:8b2bfab86aa71ae13aa41a6a26aab338e0db2b8bc75434b05aea89e011ff35a4 \
|
|
||||||
--hash=sha256:8d86d6fc60743dc916eb79e2eb1ec4818e21e427731543af40a3021851174a13 \
|
|
||||||
--hash=sha256:915563965d418f986e7e145accc592eae9e1a1be3566ff98a05d7a9ec42a76e1 \
|
|
||||||
--hash=sha256:92888bb3187c5ba50500b00b3b310c9f2c651709d28036077680cb5255450a03 \
|
|
||||||
--hash=sha256:93223adc95033dd47133a46ccfc316a0139176fd79085762e27202ec56018f03 \
|
|
||||||
--hash=sha256:9373ad13ef0d2c0fb761e04e55bfdee5a08b52cef2c882c8fbe9935b1517152e \
|
|
||||||
--hash=sha256:9409a8bf35cf78353942504b24a57de3d75b708997a1e4bd8db71ac8633ce364 \
|
|
||||||
--hash=sha256:9b7f416ff0978e2f2249330527f0ad6fa02f4932e6199692d3b52da2048c19e4 \
|
|
||||||
--hash=sha256:9bde855991b7e362c146535e3136a50bfaffc0487d38b33ca7e5edefc6e23849 \
|
|
||||||
--hash=sha256:9cae88599c7219005d879f98e5ed53341e9a122af585e1091200358a3003d2a0 \
|
|
||||||
--hash=sha256:9cf9b1a857e25c4baceeb3624e92a56df3668f398c4acba74e174d81fb4d1d3a \
|
|
||||||
--hash=sha256:9f56f72050826f63dcee7a7f55b0a77168cb3bfc553fd405e7f8f9ece75a4036 \
|
|
||||||
--hash=sha256:a090bb2c68df85450502e3e20d665e3a5af9c65a84d6508ed477badd49166fd3 \
|
|
||||||
--hash=sha256:a192e2c40070d92c3ccf777e3a5c4ff515573cd2bb7ed0c537fdadbbec5bbf21 \
|
|
||||||
--hash=sha256:a19a731138fc27d5682277d3b9df22855cea1239bce7fcec5f78f42ef2d1f3c3 \
|
|
||||||
--hash=sha256:a66c3bc5ab1f0ff2164fc9965ddd611ff0802173f4b9d24554c563f6ab7e1d6e \
|
|
||||||
--hash=sha256:a815775b6c38d4e0ff7bcffbeba67feded90202bb6a226b8dd35f1c855217413 \
|
|
||||||
--hash=sha256:a89012d6d5476ee112d20d998570ed58df2260a852afb1758809cd6900411d21 \
|
|
||||||
--hash=sha256:ae4f5fea5b8b8ccff88238cc8569303e5ee95efae67fa62922a311397a71f346 \
|
|
||||||
--hash=sha256:b6856554c4f44d79fc2307d5768854310a8f0096e501c75637542c82292b0429 \
|
|
||||||
--hash=sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685 \
|
|
||||||
--hash=sha256:b736353c0a625bbd5fcec108576e2385db3496f4f771f785ff32e108d3c3bc45 \
|
|
||||||
--hash=sha256:b7fd005a73d9e657273b7a10dc71a9e03c8fb9ee6999798d6918ce095b81ac7f \
|
|
||||||
--hash=sha256:b91363207bd9dc966a691e959bb47f64b30f7ac4b072be9968b366982f7db77c \
|
|
||||||
--hash=sha256:ba0b1d2620edf869789c3879223f52bf2afc5d31b3cb47cc57b3a12c05e2aa9d \
|
|
||||||
--hash=sha256:bbbfc8e28816f19d7c0f1816664980c0a9875d01b27cdf8eedddb639d9e108ad \
|
|
||||||
--hash=sha256:bd16aabe4a02a297c23417aa17ac6299dbd8c49f673bcd645b4929b11f5a4400 \
|
|
||||||
--hash=sha256:c0afc6800ba57ccc350374c5bd6150419915d95ce93cdbab2d783d75eaf30ecb \
|
|
||||||
--hash=sha256:c6708715abcf3c73b99508253e961a9967f02fe536532834149574eda6de0d1c \
|
|
||||||
--hash=sha256:c7c9ab723cde841fefb34efbad91e87f00a674b1fe1cd0784fde742bf2c154dc \
|
|
||||||
--hash=sha256:c8f3d67aeaf55f017982b73683f0e7342ba2f6635a78f69ce89ebb26aa411e5c \
|
|
||||||
--hash=sha256:c9790464842f85f437dbbb54417eda1e0e6bfc52dd8d22d6fd1c994b73b2dc74 \
|
|
||||||
--hash=sha256:ca403d7e4798f525fdfc78e258820419cbbd0f0ecbab9de7840e3c017cf6b8cf \
|
|
||||||
--hash=sha256:d008d90a7f2471519aef0c90dfbe73b3e6e4d5e66ac48e19154c17e89e98b604 \
|
|
||||||
--hash=sha256:d19fbd981a488e22cd04883659ca6b08f50b5974f9fd7c95655ef6a043e5893f \
|
|
||||||
--hash=sha256:d1befeed746d247c81127bb14de9dc3d30edb6e5976d34f83f86ed262b1d9105 \
|
|
||||||
--hash=sha256:d2374b62878abb00cd8309b32af6c0b715cd02dec0ca74ef12e5069bdc64144a \
|
|
||||||
--hash=sha256:d376bbd28b3a8999db1a103b3b388aee6f1ddeb3e51bc2172993efdcd86e064d \
|
|
||||||
--hash=sha256:d4a7319f304a774bed22115bc891618e45f85065ab44ea6acd07d274e750519a \
|
|
||||||
--hash=sha256:d6734d2ef8a50fbf8445c139477da401f50d62a0606bf00e20ec6d87773fefb1 \
|
|
||||||
--hash=sha256:d760fe2a4d7c3b226cb9026d6a842868d52a7901bd98420e1baf14e80da85cf5 \
|
|
||||||
--hash=sha256:d913de495d90407cd859d263bee2e5d1a4ed3eb6573c04e70d9ec619a7cbed7f \
|
|
||||||
--hash=sha256:db19d07e2e0129e974a0e65d0064fc222a446cd5122c2fd4184d2af9fc734a9e \
|
|
||||||
--hash=sha256:dca9ab98072a5a54ebacebdc45f53e645336b320c667410b061be1ca588ae709 \
|
|
||||||
--hash=sha256:ddc7dacc8ece3a182e7f15cb862d1fd616b46d076cb1ae9dd232b2c38b655874 \
|
|
||||||
--hash=sha256:ddf19c062bea7a0cc80f519243d2c01dd091be0cf952a0750d4ad576709559f5 \
|
|
||||||
--hash=sha256:def79fa35ef0cef8d2accec024f4fdc7ead3012ff02f5215c783f39f03ef8cfc \
|
|
||||||
--hash=sha256:df29a0a7107f7011e77f4eebdddec4c7331e24d787a0b21a46d63bdf7445da95 \
|
|
||||||
--hash=sha256:e09a3942ecbdee5cce73ea9d42da82b81b72ac1bf031ce069b93b5adf4eac8cd \
|
|
||||||
--hash=sha256:e242bb1c5e76e97dfa9e7f209a71e93a01d7f19ffdd5cfbb2e2d55b4f08f8ab0 \
|
|
||||||
--hash=sha256:e243bd13217235fc7290c621941c3f5cc8b66e4872495be821d7436ba2fb838d \
|
|
||||||
--hash=sha256:e2af3aad578aa6bd1384bcf4750fc285e5a9de53f40b7d41e5a0bf748edeb2b3 \
|
|
||||||
--hash=sha256:e4e81e09c1578b8df602e3db08b0b3ea0a6947ad612f52bf8dc5ea8d47691f0c \
|
|
||||||
--hash=sha256:e54da4baf05720032d527874d40b65fa4d7e5c6c6a43d0c3adbeffcaf275a2b3 \
|
|
||||||
--hash=sha256:e80e6c2f55656b4824d72065abb4ddd6a525c74bd78a0aab5d9fc2cf4fb5af50 \
|
|
||||||
--hash=sha256:ed2a239c0ea213acc1908150a3037257083c7c083128f1a4cec2ec4b97dca491 \
|
|
||||||
--hash=sha256:ed905975ab14056a2e5eb1c376cb2e1ebc5396baf84163939c518556fccde9f5 \
|
|
||||||
--hash=sha256:ee21e28f0430bd6dc9086c6e525d5e818a44a5ad19720c8a0ef766792f3eb5e5 \
|
|
||||||
--hash=sha256:ee43c17b173d46a3212baa6ead3ae258eeabdae48c263a01ccf0218c366dd655 \
|
|
||||||
--hash=sha256:ef4fcbf3327382cd4c9f540babd61248208af7b93eec4de397b4d5f58a09e288 \
|
|
||||||
--hash=sha256:eff0ac9dbe711a4aee69bf04a83896aa9b85f19641264053a9f6d48573abb7dd \
|
|
||||||
--hash=sha256:f0aa869112ef88429ae17820d99c3dd9504c9e9c671d3c246f3d7442cb051084 \
|
|
||||||
--hash=sha256:f3c96f633825733f735c5a9cf21d21a257d8e1edf0b1cee0a064b9c424ca0f7d \
|
|
||||||
--hash=sha256:f5833ad231be5eb6553de524a70f48d71b2c8563101750531e0b80184e175cd4 \
|
|
||||||
--hash=sha256:f5ec61164adcec446f8969a3358ec3f9b26bbda3b9213e5586d219afa8df2915 \
|
|
||||||
--hash=sha256:f7d486c83842422badd511868fd8a9a20e9407ace71564b6af47ce7e60a336c1 \
|
|
||||||
--hash=sha256:fb9e68df06293761f9fe66ade60a9bc6d0f5e42b8acf2939a9158af86ab0e5bd \
|
|
||||||
--hash=sha256:fc14a032f813bf5fe624d991960ea83e9715adc27e4c1830a2361eb1d02ac341 \
|
|
||||||
--hash=sha256:fcff63213e8e6e47770541a4607175404f47cbb3ebea7b6058cc82d524a0e424 \
|
|
||||||
--hash=sha256:fd1fbe0f116b6e55da77aca2c6ddcddcfac2186cbf78bdebf40fc156efca389d \
|
|
||||||
--hash=sha256:fe9753dfee015c570d73df76f899f18444d41388bffcde097deba51c4fadbb9f
|
|
||||||
click==8.4.2 \
|
|
||||||
--hash=sha256:9a6cea6e60b17ebe0a44c5cc636d94f09bd66142c1cd7d8b4cd731c4917a15f6 \
|
|
||||||
--hash=sha256:e6f9f66136c816745b9d65817da91d61d957fb16e02e4dcd0552553c5a197b76
|
|
||||||
click-option-group==0.5.9 \
|
|
||||||
--hash=sha256:ad2599248bd373e2e19bec5407967c3eec1d0d4fc4a5e77b08a0481e75991080 \
|
|
||||||
--hash=sha256:f94ed2bc4cf69052e0f29592bd1e771a1789bd7bfc482dd0bc482134aff95823
|
|
||||||
colorama==0.4.6 \
|
|
||||||
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
|
|
||||||
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
|
|
||||||
cryptography==50.0.2 \
|
|
||||||
--hash=sha256:0ddc924c04591c2811ca024d62ecad4f7f6f08af8939c211438f48a16bd23602 \
|
|
||||||
--hash=sha256:0ec5f09541743261e66e291b4a0cbf0fb2997aeaab6d9e9c740b9dba1b58d1c2 \
|
|
||||||
--hash=sha256:0ecbc5652bdb6fc9eaf89a7d196e20941adfe812f43bc4ca05d9150496821047 \
|
|
||||||
--hash=sha256:1981f1db4630889b9ef7803fadef12b056f428cb6b85c27ba57b774793b6093c \
|
|
||||||
--hash=sha256:1ba34f04897fcdaa73f74145c25f3ec146fbd56593853e88adc2e811303c5f42 \
|
|
||||||
--hash=sha256:241449bf940a5d27309bd317e6f9a2af6932113818bb2b8f5c59ddc7ef16da18 \
|
|
||||||
--hash=sha256:25784ce8b9621c90c643efb9e1e2162ab3b0224cae446ad5e70e7fcb1ce18b51 \
|
|
||||||
--hash=sha256:3dc4fd8058cea1644971207d530e1a03a184a805ffc8ebdddf0599d78a331b81 \
|
|
||||||
--hash=sha256:4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856 \
|
|
||||||
--hash=sha256:4a20ce1e5cb4284a86692fdcba7cb8754185c6b2e5c56fcef3751cf451d3cdc2 \
|
|
||||||
--hash=sha256:4e81d95e5bafc2d6e34e4bed780e53e4d5b9a2f928573428aa4d35fbec1eb0de \
|
|
||||||
--hash=sha256:58a0c478eeca76fe5e07993c5a0703def34a6dc6a0cda4f5564639b33112ffe7 \
|
|
||||||
--hash=sha256:58ddb5a8e3179d12f19e4ea34d2d32e9d63a4baa142c875c1eb59f41b7243acd \
|
|
||||||
--hash=sha256:630ebfea3bf689d075f82316324ff7433dc447fe6bc1bfc76524b74b4a9567d2 \
|
|
||||||
--hash=sha256:6f8700550aa1474a91e5dc07049c46f98b423b5b1ddd0483e0b51362eeeaf5be \
|
|
||||||
--hash=sha256:78198641e5be9521beea5aa782bb551a58068d10e6eb04c9c680c1b69f2e7d45 \
|
|
||||||
--hash=sha256:79def8d059362e7831389ed3be0ecdf58a89386e1271e35dd9f5af84e81bffd0 \
|
|
||||||
--hash=sha256:7a8701d6b584d76e909e3d305b7d126b41439876a5aaf76cddc67fc230eafa2e \
|
|
||||||
--hash=sha256:7afa5a6602a9f29af1f3a2965f831bae7c9d5d597b7cbb716d41ab3b7d89879c \
|
|
||||||
--hash=sha256:7b46165bb56eb4704e2eaaf86f3c940d19154535d9b0ca7d6d590b04060e00d5 \
|
|
||||||
--hash=sha256:7b75de3c8b3be1cdb1052747c929440c3eea46c1bc2cb8a6e3a48388e9b7b452 \
|
|
||||||
--hash=sha256:7c6d0330c472d96f6a6afe24d80dfdf15176c33096f0a4397ae4c60f3dd3be48 \
|
|
||||||
--hash=sha256:828d49b0ff5a0e3975865571c5d91dbbdd0d38d8289b249a163e9425413a5e05 \
|
|
||||||
--hash=sha256:84f964e537f916e2cc85199e5a88742e964939b575ac8598b3f9d6cc416cdaf1 \
|
|
||||||
--hash=sha256:85d0d9a31b9098e98534226d5686b47264b95e62ce459dc2e62fdfc809f9fe93 \
|
|
||||||
--hash=sha256:87e9ce85beb6b328ba370cc6e6aea483c92617b4c95b1d33a49297eb662bfb04 \
|
|
||||||
--hash=sha256:8c71ba2cd31fc93748c38e1b613200ff1c2665cbfd5341fe3a61cfde35a1430e \
|
|
||||||
--hash=sha256:92e665960f25fcdc73725b9cec7a3824f279ba97a98653afe9ffac2e43668f67 \
|
|
||||||
--hash=sha256:94e5e9f108ee10471288214d3d233fbfbb492840a8457eb85178d643ddeb32c7 \
|
|
||||||
--hash=sha256:9c8402a82ea0dc4ceeab793db05f0fafa8ca139ca34fcde5df0f596103c74107 \
|
|
||||||
--hash=sha256:9dab55f57c74c3cad24c323bacbbd04be4705ba6eb0d92e920b1fc4837ed5079 \
|
|
||||||
--hash=sha256:a582ab2ae1d34f67112cadc86702774c9ea4374df6bca6afe672817203c99134 \
|
|
||||||
--hash=sha256:a6557e5f38e065ca9fbdaf7cfc7435ecb1d113aa81a022d1b51921ee7432e227 \
|
|
||||||
--hash=sha256:a9f7355e6fab51f6c369b86fb7571cffa05edee2c2121e0380a37fb9ac1cd5c1 \
|
|
||||||
--hash=sha256:ab50ee449bf968271e820086f10a33d101dd060370abc10bcd22279be2656539 \
|
|
||||||
--hash=sha256:ac9ed99d81760c62fe89d5f0815cdfa1ba9a35141cf30f1c2d044f04b4803d2e \
|
|
||||||
--hash=sha256:b13478603dcd0a2479ff8e87e2c19a7d525734686fe3c49542472293a204212d \
|
|
||||||
--hash=sha256:c423ab384a46c4dff7217b2ea5ba2e11cffdeab6441acd04cf65a369caf0366c \
|
|
||||||
--hash=sha256:c5e67125c7dca78d199ec4e116aa93dbb83494808ecbb8211a2cb09b1bf41dbd \
|
|
||||||
--hash=sha256:c71be1cbfa5cd9a41ee452acf1eccd82b2c05950358b106ec8ceb83411d1a020 \
|
|
||||||
--hash=sha256:cbc8738fd8526d80f35cb3a40d41f41a2e7030bb3b18b09a6778ef63d291c2fd \
|
|
||||||
--hash=sha256:ce47f66801c20ec6c6632453bb5960fe38939e9306970b48b3a5a26de7745d94 \
|
|
||||||
--hash=sha256:d370b8d1dfcdf7130178137f6fbee6140774a1acc6cacefc4b42643ec11d0a3a \
|
|
||||||
--hash=sha256:d38cdff612d06fa6a32840d5e1b1f7a27cee4a349aa9085d94a67789d6bfd408 \
|
|
||||||
--hash=sha256:d8947001be83df1394050758ce0e745dd74fb134eef0a4b5124208dfc3a68c37 \
|
|
||||||
--hash=sha256:deb9fde5c60e437ee4821bc9bc39ff31b42135c27e1dc61ef0a629389c1de62e \
|
|
||||||
--hash=sha256:dfe9763530994147d9af1def057a5b9658b00e8f8fe8743d144d1e0911c2e454 \
|
|
||||||
--hash=sha256:e105ab60406787da31fccc883fc0f733af1efd78f0136a4599692c4083a73d0c \
|
|
||||||
--hash=sha256:e275096ea1e60cc595cda2836fd4a6c725d1125108b868be17f53684d164e2cc \
|
|
||||||
--hash=sha256:edc3342adf8f697fc5f59c887a304356f147b397809440ed64e2fa6af2f50f37 \
|
|
||||||
--hash=sha256:ee247f5c245c9a2fe7c8e2214e295918838e44e00a45a6718451e4004219e767 \
|
|
||||||
--hash=sha256:eef4c2f3423810b3070ab391f85436d2f8bbfcb286ac15cbc73190b3563b1f1a \
|
|
||||||
--hash=sha256:f21e8a22c8605750c7af886bab299a363721264061b4ac0a30efb73cfd58efc5 \
|
|
||||||
--hash=sha256:f265528741e048bce55c3463ed721fb0aa45a5888d8add8cfeccb3035451bbdc \
|
|
||||||
--hash=sha256:f2f9bd7f90c64fe89253f0a2c05e3c4856072660429ce8831b4235bf29403a67 \
|
|
||||||
--hash=sha256:f785f6161f202ab04d8ca194158968798e480ca058943907972da5f12e2881e8 \
|
|
||||||
--hash=sha256:f9f6143a8c75945eb960d9eb98905a441394abfa24afaae239d514ffb2586480 \
|
|
||||||
--hash=sha256:fa8f5efb344d6908a1ce62f4a24e2e5780f825d6f53f5f50ec5ffacac72936cb \
|
|
||||||
--hash=sha256:fdd28f912fccfec1846a94e2e1e8f9b0012f557f0c46fe4f3eb0d7a87afcf90b
|
|
||||||
exceptiongroup==1.2.2 \
|
|
||||||
--hash=sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b \
|
|
||||||
--hash=sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc
|
|
||||||
face==26.0.1 \
|
|
||||||
--hash=sha256:8183d94bc248baaea855a9f8445f97a22a9988908e60abddccc6e251da77c4c6 \
|
|
||||||
--hash=sha256:ab0a83c37c9789dce658a67a9a80eafaa113c9ec37c5a9d950ff5480542a062d
|
|
||||||
glom==25.12.0 \
|
|
||||||
--hash=sha256:1ae7da88be3693df40ad27bdf57a765a55c075c86c971bcddd67927403eb0069 \
|
|
||||||
--hash=sha256:b9f21e77f71a6576a43864e85066b8cc3f0f778d0d50961563f8981377a6dcb1
|
|
||||||
googleapis-common-protos==1.76.0 \
|
|
||||||
--hash=sha256:59e13344a9f3651aa201a03e2bee815a3bf43a4baf1f9ff8a9b62a840ce25fac \
|
|
||||||
--hash=sha256:71db0e44a1d4c2dd024ebad44ca67129cc1e2892e4861df466764749d5ef8642
|
|
||||||
h11==0.16.0 \
|
|
||||||
--hash=sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1 \
|
|
||||||
--hash=sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86
|
|
||||||
httpcore==1.0.9 \
|
|
||||||
--hash=sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55 \
|
|
||||||
--hash=sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8
|
|
||||||
httpx==0.28.1 \
|
|
||||||
--hash=sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc \
|
|
||||||
--hash=sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad
|
|
||||||
httpx-sse==0.4.3 \
|
|
||||||
--hash=sha256:0ac1c9fe3c0afad2e0ebb25a934a59f4c7823b60792691f779fad2c5568830fc \
|
|
||||||
--hash=sha256:9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d
|
|
||||||
idna==3.20 \
|
|
||||||
--hash=sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44 \
|
|
||||||
--hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c
|
|
||||||
importlib-metadata==8.7.1 \
|
|
||||||
--hash=sha256:49fef1ae6440c182052f407c8d34a68f72efc36db9ca90dc0113398f2fdde8bb \
|
|
||||||
--hash=sha256:5a1f80bf1daa489495071efbb095d75a634cf28a8bc299581244063b53176151
|
|
||||||
jsonschema==4.25.1 \
|
|
||||||
--hash=sha256:3fba0169e345c7175110351d456342c364814cfcf3b964ba4587f22915230a63 \
|
|
||||||
--hash=sha256:e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85
|
|
||||||
jsonschema-specifications==2025.9.1 \
|
|
||||||
--hash=sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe \
|
|
||||||
--hash=sha256:b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d
|
|
||||||
markdown-it-py==4.2.0 \
|
|
||||||
--hash=sha256:04a21681d6fbb623de53f6f364d352309d4094dd4194040a10fd51833e418d49 \
|
|
||||||
--hash=sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a
|
|
||||||
mcp==1.29.0 \
|
|
||||||
--hash=sha256:52d01f334de1868cc3bb2d6604931126a67631f99a6c5d3b82ba47290315ec36 \
|
|
||||||
--hash=sha256:f5a075bb611f23d6f4d080c6a1699fa62772eebc562ba9e66b306ddde1c755f7
|
|
||||||
mdurl==0.1.2 \
|
|
||||||
--hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \
|
|
||||||
--hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba
|
|
||||||
opentelemetry-api==1.45.1 \
|
|
||||||
--hash=sha256:aa38ed19bcc084ba42782a73255b3582283eced7ad6dddbd6695189e69adfb75 \
|
|
||||||
--hash=sha256:b31553efa588ae44bc306f863c785c5333a9ecc091248c6ee68b4b6c87fdedfb
|
|
||||||
opentelemetry-exporter-otlp-proto-common==1.37.0 \
|
|
||||||
--hash=sha256:53038428449c559b0c564b8d718df3314da387109c4d36bd1b94c9a641b0292e \
|
|
||||||
--hash=sha256:c87a1bdd9f41fdc408d9cc9367bb53f8d2602829659f2b90be9f9d79d0bfe62c
|
|
||||||
opentelemetry-exporter-otlp-proto-http==1.37.0 \
|
|
||||||
--hash=sha256:54c42b39945a6cc9d9a2a33decb876eabb9547e0dcb49df090122773447f1aef \
|
|
||||||
--hash=sha256:e52e8600f1720d6de298419a802108a8f5afa63c96809ff83becb03f874e44ac
|
|
||||||
opentelemetry-instrumentation==0.58b0 \
|
|
||||||
--hash=sha256:50f97ac03100676c9f7fc28197f8240c7290ca1baa12da8bfbb9a1de4f34cc45 \
|
|
||||||
--hash=sha256:df640f3ac715a3e05af145c18f527f4422c6ab6c467e40bd24d2ad75a00cb705
|
|
||||||
opentelemetry-instrumentation-requests==0.58b0 \
|
|
||||||
--hash=sha256:672a0be0bb5b52bea0c11820b35e27edcf4cd22d34abe4afc59a92a80519f8a8 \
|
|
||||||
--hash=sha256:ae9495e6ff64e27bdb839fce91dbb4be56e325139828e8005f875baf41951a2e
|
|
||||||
opentelemetry-instrumentation-threading==0.58b0 \
|
|
||||||
--hash=sha256:eacc072881006aceb5b9b6831bcdce718c67ef6f31ac0b32bd6a23a94d979b4a \
|
|
||||||
--hash=sha256:f68c61f77841f9ff6270176f4d496c10addbceacd782af434d705f83e4504862
|
|
||||||
opentelemetry-proto==1.37.0 \
|
|
||||||
--hash=sha256:30f5c494faf66f77faeaefa35ed4443c5edb3b0aa46dad073ed7210e1a789538 \
|
|
||||||
--hash=sha256:8ed8c066ae8828bbf0c39229979bdf583a126981142378a9cbe9d6fd5701c6e2
|
|
||||||
opentelemetry-sdk==1.37.0 \
|
|
||||||
--hash=sha256:8f3c3c22063e52475c5dbced7209495c2c16723d016d39287dfc215d1771257c \
|
|
||||||
--hash=sha256:cc8e089c10953ded765b5ab5669b198bbe0af1b3f89f1007d19acd32dc46dda5
|
|
||||||
opentelemetry-semantic-conventions==0.58b0 \
|
|
||||||
--hash=sha256:5564905ab1458b96684db1340232729fce3b5375a06e140e8904c78e4f815b28 \
|
|
||||||
--hash=sha256:6bd46f51264279c433755767bb44ad00f1c9e2367e1b42af563372c5a6fa0c25
|
|
||||||
opentelemetry-util-http==0.58b0 \
|
|
||||||
--hash=sha256:6c6b86762ed43025fbd593dc5f700ba0aa3e09711aedc36fd48a13b23d8cb1e7 \
|
|
||||||
--hash=sha256:de0154896c3472c6599311c83e0ecee856c4da1b17808d39fdc5cce5312e4d89
|
|
||||||
packaging==26.3 \
|
|
||||||
--hash=sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79 \
|
|
||||||
--hash=sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c
|
|
||||||
peewee==3.19.0 \
|
|
||||||
--hash=sha256:de220b94766e6008c466e00ce4ba5299b9a832117d9eb36d45d0062f3cfd7417 \
|
|
||||||
--hash=sha256:f88292a6f0d7b906cb26bca9c8599b8f4d8920ebd36124400d0cbaaaf915511f
|
|
||||||
protobuf==6.33.6 \
|
|
||||||
--hash=sha256:0cd27b587afca21b7cfa59a74dcbd48a50f0a6400cfb59391340ad729d91d326 \
|
|
||||||
--hash=sha256:77179e006c476e69bf8e8ce866640091ec42e1beb80b213c3900006ecfba6901 \
|
|
||||||
--hash=sha256:7d29d9b65f8afef196f8334e80d6bc1d5d4adedb449971fefd3723824e6e77d3 \
|
|
||||||
--hash=sha256:9720e6961b251bde64edfdab7d500725a2af5280f3f4c87e57c0208376aa8c3a \
|
|
||||||
--hash=sha256:a6768d25248312c297558af96a9f9c929e8c4cee0659cb07e780731095f38135 \
|
|
||||||
--hash=sha256:bd56799fb262994b2c2faa1799693c95cc2e22c62f56fb43af311cae45d26f0e \
|
|
||||||
--hash=sha256:c96c37eec15086b79762ed265d59ab204dabc53056e3443e702d2681f4b39ce3 \
|
|
||||||
--hash=sha256:e2afbae9b8e1825e3529f88d514754e094278bb95eadc0e199751cdd9a2e82a2 \
|
|
||||||
--hash=sha256:e9db7e292e0ab79dd108d7f1a94fe31601ce1ee3f7b79e0692043423020b0593 \
|
|
||||||
--hash=sha256:f443a394af5ed23672bc6c486be138628fbe5c651ccbc536873d7da23d1868cf
|
|
||||||
pycparser==3.12 \
|
|
||||||
--hash=sha256:a076f3f489b39b43ed13563a1dafe42447445bec2e294154ec5c57fcdda4c85e \
|
|
||||||
--hash=sha256:f03387877eab82ce01bbdfd0ba7252ee55a90b1c708d5129e2ce915475cf1db6
|
|
||||||
pydantic==2.14.3 \
|
|
||||||
--hash=sha256:1054f237f4d4733e5a30e1e2333bd33a2004ab9ab1510bd053a9a31bb48e232d \
|
|
||||||
--hash=sha256:3f7b347782ab7e4cf4c798496ae3a82787d9f21ec12676a9c564355eeef8daa8
|
|
||||||
pydantic-core==2.50.4 \
|
|
||||||
--hash=sha256:0001d6920e3a5d92758cda460d6dc9f918a78ad6d5d092f1c8b5395e6b775356 \
|
|
||||||
--hash=sha256:0574866e05f6adeecc520d87e87dd06210c0a51706341f6ef8421572f5a64444 \
|
|
||||||
--hash=sha256:09450778e3ab58d3f565899fcfbf6c82926e31af29e28e799d1d50941316e0cb \
|
|
||||||
--hash=sha256:0af56dbf8822ba9f4efcbbfdc15478f8b6fb08f1609860cb50aa2cc8476b3c34 \
|
|
||||||
--hash=sha256:0b059a7968b1911be5a2d9a8234827ab0bef9d1e465d4b42da525894143550e8 \
|
|
||||||
--hash=sha256:0ec20aca2b067369913716847f7dfe5f4dddf16a46965b7a70bbad5defaaba86 \
|
|
||||||
--hash=sha256:0f87ae9db5ba8d8de40dcb93982cf8dd544e6552a80d3345af51941cc2146b80 \
|
|
||||||
--hash=sha256:1239daaf063e62213ca1f34d96663900bd7510c42a786e843fd328af70e46445 \
|
|
||||||
--hash=sha256:13b6dd62b5279f5b9d72f3bf918a35443ee8bd549241d9dc52d79a2c3b6d7016 \
|
|
||||||
--hash=sha256:15bece43a02ad543c621c8305e67dedb5f27d378c5ba741e5a2c36523f8ef37f \
|
|
||||||
--hash=sha256:16902a147b3da4840612164a5e67947104d63e978f7a57c395877a5e26690b9c \
|
|
||||||
--hash=sha256:1afefe44ec042fbabfb4483ea258c04cf75ff4ff328d754f09b321fdaa232aca \
|
|
||||||
--hash=sha256:1de7be9a66fc8536770481ab64a05aae5067c725f2b29a09543af00e6a417b97 \
|
|
||||||
--hash=sha256:1e20cbde2b6deb33a51d08cd168454dd9044ec7d4474056f4d98d63f51578783 \
|
|
||||||
--hash=sha256:2039e323acee9abfec1fb5f661776e8965fe5928f3b7f8431900a774cba5c317 \
|
|
||||||
--hash=sha256:219114f8dcdcbe4720d82ef016b1287ce5a0a67d7c69ca61524eb72e82aac344 \
|
|
||||||
--hash=sha256:22e874666bdbd96d6bf629d32cd8ab376fedf1fd62585b52a42b9fa9fa6c20b6 \
|
|
||||||
--hash=sha256:23a9ba564b2db709ff16eca990992ba95a19069972b34bff87c81d4b473cd755 \
|
|
||||||
--hash=sha256:25e7e1080f9f7ce7cd9d114b31470ce912771bd02f38c824721d3c35d312abff \
|
|
||||||
--hash=sha256:26cb012c4b8ca9f847bd0ac15978bd3d0f55b050bfbe6c47355edfc7e945029b \
|
|
||||||
--hash=sha256:29358a8ca74e7d81158d14e2b10c904bd18773293ae3788716c0626fe0342347 \
|
|
||||||
--hash=sha256:2980a701be88f9128a7470189fa3bcda5387f76c298a6f8e000fc29eb2a6f4e7 \
|
|
||||||
--hash=sha256:2a60ec2a57ac3ef3767e526e9bf706ec75aa3d79c4ea134d9d4fcf7c62a297a7 \
|
|
||||||
--hash=sha256:2f42584e5785385f681163a42506cab0d51295e17599a648396c52a7046c1372 \
|
|
||||||
--hash=sha256:2f5cc5bcb94063fbbdfd285a2b302da34af07491337c10bb35de1d5220fa1583 \
|
|
||||||
--hash=sha256:2f6767122b37c780bb756a720a4eef2bc6a050a0a1143428834b3cbc89448bd2 \
|
|
||||||
--hash=sha256:300753f71c73302e218124baf995f00058e085cd01869bd9610bcbd0bd4500c1 \
|
|
||||||
--hash=sha256:30d4dc35bc0eea52202a90b3820445ee0072c820241bfa710a623a078c9b267b \
|
|
||||||
--hash=sha256:32a991aebd165f227b7c7c60bb9d66c2c7de9c24308552da264c9938fde0f8d6 \
|
|
||||||
--hash=sha256:32d6dda86383645ec428ea64dfc277036f5cbc60a72238eab28b91a3fdb9a113 \
|
|
||||||
--hash=sha256:33b21f69540a12c2053cd1d95766d8bd9667a3897f7c712a642de8aa37eb0865 \
|
|
||||||
--hash=sha256:39f489ce31272073e6e146f6781690f9c1ee8c126836e6403361ef91154d89fe \
|
|
||||||
--hash=sha256:3a48a5254d15a0ad050318bfc7a9566d4ec740118187e8f303e47a6840287eb7 \
|
|
||||||
--hash=sha256:3b8ee2589a082739c522c1fe4be227412fcf108b903abb6672ae2f5570558882 \
|
|
||||||
--hash=sha256:3de6c2a4df2af0ac9ab4dc1488746fe8b1a90e27955d870d9edda3187d20092b \
|
|
||||||
--hash=sha256:3e0b395648c6cb871bceb2906907f255dc876ec425f2d5b024e129985cea8519 \
|
|
||||||
--hash=sha256:3e547ceec1da7382f01f9e13963023e53367a71802c88778b21b9645a077cbdf \
|
|
||||||
--hash=sha256:41b2cd8b29dbb5a4c9828a70f50d1abfc92011115c813213d3a91205c6f731b3 \
|
|
||||||
--hash=sha256:41f4f8ae714e4fea1d635880f8a1af715ecf080eed4d13c5b04a0f3210f9c61a \
|
|
||||||
--hash=sha256:474f7e598c7902165662a5d5160d3fce31037890a2975a9871ebf7c05862300b \
|
|
||||||
--hash=sha256:477af785d1846e4e96bf56983b92ea7553aaeccdeb8acdaa55c7cee9eda0ae32 \
|
|
||||||
--hash=sha256:49eb1241a969a5994db6880c18c012b6cbe2340343d8f529721571806583e500 \
|
|
||||||
--hash=sha256:4c29b8f2d6417069bb1f257e6b9113f5d64dc2f554cc200ea90b4fe2c5cdb733 \
|
|
||||||
--hash=sha256:4eb15be588407148ef5937dc8d9256a71f6b115e6cddadb7aa20b6ee384680dc \
|
|
||||||
--hash=sha256:4eda7e3fdef382b7d4492745988a5baaf6953923a337f8b9dde5f76fa8afde20 \
|
|
||||||
--hash=sha256:523466eba8ee10f7480f3c2057563145978011c583130d2cc01fb1e7af808e25 \
|
|
||||||
--hash=sha256:57fa0a9490785139f1a4e4f43891830d55dfe4408845c0c9cb5eff4aeaf75f69 \
|
|
||||||
--hash=sha256:5b26e5f1793b96cdc60242bf38da86ff24a27a708aa396214cac9b534bf571c7 \
|
|
||||||
--hash=sha256:5bc1811ef2b4d4ba63e8e452f6e332b6374bd1d2cbbfdf66826c8cb1f71dd10d \
|
|
||||||
--hash=sha256:5c074454dc6d4f6f4ba6561a56bf33a14db7651d882a5a5321ba3ae8868e082d \
|
|
||||||
--hash=sha256:5c1013647be741647895c102831dcf79c34209662dbb683df9efb864417ed7d5 \
|
|
||||||
--hash=sha256:601fce6cea9ddeaa85329e12e7f351def38d233075f42a3012b9c48071b02941 \
|
|
||||||
--hash=sha256:6118e5a5550e36582e19bac1a403711a748f9f18251b054c326d3db02aaa7a18 \
|
|
||||||
--hash=sha256:629eae995185540406e3635df5d5cf1d44f19ea240840b835d3f44541ff694d8 \
|
|
||||||
--hash=sha256:6348ad12fa741bcc9c2f173e99fbf27cbc038826d8c31a4a7d836eca27878ba2 \
|
|
||||||
--hash=sha256:65376dbe1ab4dbc768ca2b72b7c13993562c035f5925fd3bc7ff9c8c585c515d \
|
|
||||||
--hash=sha256:6619d49a89a15cd04334f76fec530c155923bfc60da74ff5d815a52629e1aa6c \
|
|
||||||
--hash=sha256:664e74848c2f5fc27db8505fe24e1ecd3ac669412913bf73d176916f86cc08e2 \
|
|
||||||
--hash=sha256:67f7cc397e1d5556a801d1cba74de0d27d827eb242e6c036c0ca273c745414f1 \
|
|
||||||
--hash=sha256:696613a0c0e7b2b35356e389ba4195ce20cfe7a2fc2e992c87d974d973eabec7 \
|
|
||||||
--hash=sha256:6c5687b59b6ba0f663c4f2f15470f68507d6b45ccd3a19ee6d224f95cbee70d8 \
|
|
||||||
--hash=sha256:6c7d7b0b596319e9ce79ef96ce57a14054a2eac629c0588a0539187a218be799 \
|
|
||||||
--hash=sha256:70dbc9f83c41f37a4faa62dae5203853847223a891da446f48ef2efcfd5df806 \
|
|
||||||
--hash=sha256:71395a43da5584bb70556f380387e15f845c0dcf76373c1afbfa0025737576ac \
|
|
||||||
--hash=sha256:71ade6d2e445839350d589ff99bbddfde16f3f32db28da5c894a09f99c8b2a03 \
|
|
||||||
--hash=sha256:71e03d2ea1a221d020cfc5b6cc8bbbedef23a06704c70fcf4d0afb42965b22d1 \
|
|
||||||
--hash=sha256:7210398a1607ad607dc73196e575b3148b00a333cbb602ddbe1b60ba54554f43 \
|
|
||||||
--hash=sha256:7472c39480ccc11dda69a196d1b7c7a6b48eb6594b77f05d945599d3e47f731c \
|
|
||||||
--hash=sha256:7646353a5a7c553c04167aca628e2550b538f492765b03ccf34321a560acc43c \
|
|
||||||
--hash=sha256:76e0065998159244ff4c097a6c05ff08019c6fbb6e597a85846e73044f0215b3 \
|
|
||||||
--hash=sha256:789a6453e5ffd18a7ab6b8c3a0dd8403053829197ec258ecb90c604c21ffcc99 \
|
|
||||||
--hash=sha256:789f88dea57841cdebef392b5d6e90444d767117e9ff2e0d9172df5c9de6690c \
|
|
||||||
--hash=sha256:7ac2769a7ddd661e07e26c12220adc31b17014c48234b2a5a88993b8d4109e09 \
|
|
||||||
--hash=sha256:817953730e4a73a09008b010c4a42396cefe799616a22df2ac21d3927b3080cf \
|
|
||||||
--hash=sha256:83d2beac85b757bfc404c5c0612df51c4ef33bbb7be65cf4a96b4da7cbc4ff4f \
|
|
||||||
--hash=sha256:86c7c4615634b5c57a79770f5b738354e45ae219a89949aeae84f19169a05283 \
|
|
||||||
--hash=sha256:8923fcd49f875e8a0448d7223d1fdf1a9973ae2d1f20d4158753ceb8909facd2 \
|
|
||||||
--hash=sha256:8cceae48ae7f94990c2f4e36291e9ec9868735e8b0f19e4489a17b0422338466 \
|
|
||||||
--hash=sha256:92f8f63df729061bb14558ed740e7a222f6e2aa6c2e6a5bcfb4e706676562049 \
|
|
||||||
--hash=sha256:930ad463d3fb7a340d323bcc496ec32dae469ec9974c29ff569f19806b6b03b4 \
|
|
||||||
--hash=sha256:94733cb447c37b0ce6f71b39ca1288d5f966a084023a5617b4cc35a852586859 \
|
|
||||||
--hash=sha256:9be1cfe715ecaa060ffd5d599ef410b94ef2697a0eed4cee562f788a2aa2175b \
|
|
||||||
--hash=sha256:a0c5210d038418a115e7cf8706bfa611bd14add2f5787274dba45aadca3155e0 \
|
|
||||||
--hash=sha256:a2f8716344bbbd10443391be0b1f2003b34949e3c4e6883005c2bc498ab6b64b \
|
|
||||||
--hash=sha256:a4bb174bd65f795c39ad6642d9d5bdc43351b306b7d0a654ab0d0abb38be245f \
|
|
||||||
--hash=sha256:a70d5effebd81ebd8e15a8aabdc7980832367b2b00c36543bac378977004cc80 \
|
|
||||||
--hash=sha256:a9ee990bf2cfbd81574c5d4f9f6c9d480a14b5b43d2c4f2ca13f4c6f48089394 \
|
|
||||||
--hash=sha256:ab2822bcdcefb54d1e8ca29f5e3ec3afe160fb794bb3a3a73b09d11ed2671104 \
|
|
||||||
--hash=sha256:ad92d255a165cde5f9882ff69699eaf5495e0a1f32e97566bbbb80f11e46781f \
|
|
||||||
--hash=sha256:aead3b74b68396bf0feab5d57e050b730ded7df55853c1e048a87e00aaf033c6 \
|
|
||||||
--hash=sha256:aeb2e123cbf978a905e9f55155c1b8316fbbfa7cf64d04521fe174bab302d100 \
|
|
||||||
--hash=sha256:aec3c2d741a8e3ee993de7f95f37afb51e31b169c95dbd29da4cf6688f340914 \
|
|
||||||
--hash=sha256:b0cdb655fbd1562c2dfc9986f9103a106f7058cd0915afc6e656d4b1d73f3387 \
|
|
||||||
--hash=sha256:b26f39a5be3cd91a2035818be3d0ffdf5282c3e1f5f53d3b80b7024021acee52 \
|
|
||||||
--hash=sha256:b2f2d13239487cecaae98c9f4d5904ad0737643cdf8873c88ec6a78b12214f20 \
|
|
||||||
--hash=sha256:b300a30304c4c6aeab03ed06809819d9eceacdd58441d3c7dffe41edfd006091 \
|
|
||||||
--hash=sha256:b42f64825f5d750228f08318a9bf4d723b7ecb4c472aedcb3013c3ec2dc1f949 \
|
|
||||||
--hash=sha256:b67d38e8bb0ade7e6e84575e4bb153fab35b122458077273aeb08fdf12be9d2c \
|
|
||||||
--hash=sha256:b867f9fd183d76977f810c626d539265183c25b2284762893a31e8d6cacc81c0 \
|
|
||||||
--hash=sha256:b99bed995ed7c41515c11fe2beb86f8a6cc298e5537cae2f736de2f982f74ef0 \
|
|
||||||
--hash=sha256:bd46bcc28ed85d3cf71581b42d90b4ebd1f2062f81879519fed209f8a4d1cfc6 \
|
|
||||||
--hash=sha256:bee28aab5a580eec673f7b68dfa8dece3dd37bd207ef8d22fafe23a8e9837296 \
|
|
||||||
--hash=sha256:c04e9d920e2674f54651fd260a15c5d2843526c73d5242ee4311325ddc9573b3 \
|
|
||||||
--hash=sha256:c4c5a1770ecfe8bdb6c6f09f8d81ea4de04f7efb012fac1efa4ad315dccc1fd1 \
|
|
||||||
--hash=sha256:c733087ecf7dde06b1d071679bfd5f3ba03266ba77814c1c7253bc48c9adedd9 \
|
|
||||||
--hash=sha256:c813ada7a651193acda85b6bc1cf12abd4b37cd25c7c6a75d7183512cc374969 \
|
|
||||||
--hash=sha256:c81d98e27d9d9261909dcccab1ba5d6ea1c98b0bb9470e368604614fd1d36ddd \
|
|
||||||
--hash=sha256:c81e35862aced259177a537ce1a6264c3a97bae1ced184ca9dc10ea754563688 \
|
|
||||||
--hash=sha256:c856e439a9d54d514e81a7131229ba151cdf81df7c408e0f6c89340e5003dfe2 \
|
|
||||||
--hash=sha256:c9e70012926e97069cdd09221861aff412aa94e4cac2e019055cdb79485b150c \
|
|
||||||
--hash=sha256:ca83a32b2b41653d89f09a3d22b770bca96da72273bef8f7a68136bdd1e8b823 \
|
|
||||||
--hash=sha256:cbf0777d54672990b10cb8ca9b0523499e182d7e2ea39f86b138519a902aa601 \
|
|
||||||
--hash=sha256:d49127f137f871cde3c5650af33bbbdcee02679dae76e020902fa106f522b8ae \
|
|
||||||
--hash=sha256:d690121e80ab16e623415351ab24713534d4e500b3cadff216409cb6826063d4 \
|
|
||||||
--hash=sha256:d6a166978f22f10cb91413f70519861605219346decf65bc79008f9257c94afe \
|
|
||||||
--hash=sha256:d6e3485a5e5c01fb5339c1ee3d4b9e21e2135a2a9d44caafb71acd994487ee7c \
|
|
||||||
--hash=sha256:d7d406709ae924cf0b08b8282ca2f0e1c90526911d93bc040557cbc83b74c55f \
|
|
||||||
--hash=sha256:d8201c9f9035520cdcc7dcad383b039ec8123969b87e01cf27c3dd883c02313b \
|
|
||||||
--hash=sha256:da779ae50b46f3f7d1e1b5f362fdc0ad376a49fd55f6f3122dc2b6149936cdf7 \
|
|
||||||
--hash=sha256:dcf2c7eaaa4cafe8e49b017e5bb49e76e084ab6f0cd712ee4019c812b5cf68b8 \
|
|
||||||
--hash=sha256:dd8bed00731a21e3106e5dd6bbffb6c775a2c0bbc7c0c9face534d830057bdc9 \
|
|
||||||
--hash=sha256:df1c174796cd63eb6b139f7daf783affe1f3ed659605850e843b24764c21bfc5 \
|
|
||||||
--hash=sha256:dfcf6e51000b34f7026322cd9ea9bc340d745637e27e0bbc22f504b4f6b967ee \
|
|
||||||
--hash=sha256:e498900bfbf7ddddd862f810440c09e9b81674739e8a11d619b40906dccd4a9a \
|
|
||||||
--hash=sha256:e512c75ec5cf4475c1aa50ad975ecdf253f4963b06e152e1a11edd6de4010753 \
|
|
||||||
--hash=sha256:e5bd109d095aaae989a0463d5ef0fcc43e9ddd5de125e656d3c119a79e466380 \
|
|
||||||
--hash=sha256:e6b4b08d09054310a4dc389fa61ee22a7a5a292cb23ab8a985136ca8828bf924 \
|
|
||||||
--hash=sha256:e6da138a1ecc1341c8b788a5ee822670b03788e1f5decf7af9d461de6e508b8e \
|
|
||||||
--hash=sha256:ea2f61b0bc12f3592288503961b764579dea0658852d96a0b3d823614d808821 \
|
|
||||||
--hash=sha256:ed9c0b6f236648dbf30d57e9f57e1f74878caafa04833a19f529b5ba5164b7a8 \
|
|
||||||
--hash=sha256:edbca8789fd10f0de534b660a6b4c71f1fd18039679c918dad392ab044bb37e4 \
|
|
||||||
--hash=sha256:edc17549ab592e33cfcaf285f047bb75fcd98f608aa9309af1187fd736ce9641 \
|
|
||||||
--hash=sha256:ef8a9ddb2e2a4eae4abb72dc0710eca6c2726779b0664bd10c3ce9fcfaed8c4e \
|
|
||||||
--hash=sha256:f08ee8248aad2d054e5bc4c73554d4505464698f6d754f16198dbc5764e9821d \
|
|
||||||
--hash=sha256:f1d62fb172db35c6478c9323da34ff37d1f3d37d7d44337a9d94ba8c583e5730 \
|
|
||||||
--hash=sha256:f8fd23653a252cefabea11cd041efd7b80bdf403e43a36dea53f9cb0aaa21f0f \
|
|
||||||
--hash=sha256:faa4e96385c820ce9d7f7a623486e23d4134ae3c9ba2071e44e0ab5a5a5002c4 \
|
|
||||||
--hash=sha256:fb2bb5b557080da398b866408117d98fe9731a12334afd0cdff221b458cdc5dc \
|
|
||||||
--hash=sha256:fc04affef30be98c1f36f0c422a4061ef618fdc1dde79f5ad5458dd496fecffa \
|
|
||||||
--hash=sha256:ffb616d8d55965839670301dc3bae3abacff560a7e137a89056058a8a9da4d96
|
|
||||||
pydantic-settings==2.16.2 \
|
|
||||||
--hash=sha256:3dc08ffabed2bbd5dc2dd55ead7b78b4e4c5cd776aecd04310db5f1224caaf46 \
|
|
||||||
--hash=sha256:8d523e5c129b097686bde019bd6109bff53f4c8c3f63f1ddf9933ffa42e5ab4f
|
|
||||||
pygments==2.21.0 \
|
|
||||||
--hash=sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9 \
|
|
||||||
--hash=sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c
|
|
||||||
pyjwt==2.15.1 \
|
|
||||||
--hash=sha256:42d59d631f7768a1028a64c7ff581a9bf7519804daf91fc5b6c56e30eec5e193 \
|
|
||||||
--hash=sha256:4f259e80cdfb6b3fc18a7de51fd1ef9ec79652f25019bae68975ca2468a34df8
|
|
||||||
python-dotenv==1.2.4 \
|
|
||||||
--hash=sha256:42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc \
|
|
||||||
--hash=sha256:f0d53e69935a851c0dcc78f3ab7aaccd8cabef0b92382b576b824212902873c0
|
|
||||||
python-multipart==0.0.33 \
|
|
||||||
--hash=sha256:8f16c07b36add9da6b2ee87d3efcaf0a45a6de9c3d0a5dd94e9ccf7675a7bc45 \
|
|
||||||
--hash=sha256:b8112424a6abd162ec08d390565dd113ad699f2fe6fef3c987b8bbcbfe9e390d
|
|
||||||
referencing==0.37.0 \
|
|
||||||
--hash=sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231 \
|
|
||||||
--hash=sha256:44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8
|
|
||||||
requests==2.34.2 \
|
|
||||||
--hash=sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0 \
|
|
||||||
--hash=sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed
|
|
||||||
rich==15.0.0 \
|
|
||||||
--hash=sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb \
|
|
||||||
--hash=sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36
|
|
||||||
rpds-py==2026.9.1 \
|
|
||||||
--hash=sha256:00ba2d8c7dd4ee537978ddf4b3fbd712bef2d8751603f7f3146b3f4287768e25 \
|
|
||||||
--hash=sha256:01445c8d194aa032a08e944f16567672da1c62dbdbefd8b6d0693032e290cf68 \
|
|
||||||
--hash=sha256:028ad274ea951dac64491b5d1e65712a4aeabfdbdb9fccf797b57bd899b0c495 \
|
|
||||||
--hash=sha256:0483515261947e4e8b8e1375bf7463e7eb6ccfb3d86e7b554d90cd5285f20f32 \
|
|
||||||
--hash=sha256:068c37bba854ec2fe42f7365c640af11dd9895890ccbf2df5070d0c059bd7f96 \
|
|
||||||
--hash=sha256:074a4d198bc34d9a8ea425114fc3ded6d11ec01f6a314a8db67454a5152d8834 \
|
|
||||||
--hash=sha256:07deecbfce94c78473018bc7d10b337cc651d12df87a1eb2cb3e4024bc9c33d0 \
|
|
||||||
--hash=sha256:08dae4a4095150a7c4545a1fb40b98e1ab1744fbc2770d92c977b9dadaa49ab6 \
|
|
||||||
--hash=sha256:0da298fb372dc192610a4b9ecbc68a0cd8b675bbbd1fc519d01b41cfd658333e \
|
|
||||||
--hash=sha256:0f045bb053c9057720d72c56dffe30dffdc05997b2897a827b9325f0ab6623fa \
|
|
||||||
--hash=sha256:10e208f2425d973938afcd56e28a7c4be32e27b6a60b5d381f49fb9d8acf9759 \
|
|
||||||
--hash=sha256:136a1c3fe4402b7008bc81cb62ee538481795b61a7e83df88dff3b3f02b726ff \
|
|
||||||
--hash=sha256:159a7aab5c5e8b112c8830f54717ce56da1252ebdbb526f5be2df2309280b9e7 \
|
|
||||||
--hash=sha256:172e47169583f46ce118cbec68e6795d0da0f4606b488b6434f8276bca0a058c \
|
|
||||||
--hash=sha256:1c2d1f6da5128eabf34e963d7163a818846075a52568250d006c4c953b40f903 \
|
|
||||||
--hash=sha256:1d55198263bb51f557550c6ed2e6d1cb6a6fed6eb5c9120b741c5926bef8a45d \
|
|
||||||
--hash=sha256:1d77b649e6f7cdf12ca5c2a98dad0ad37f9ea9b6f960408a92f0cb12bb3d04d9 \
|
|
||||||
--hash=sha256:1e8d4d79d828299bf44a55db22a9388ab967b49d17132c88eab0f4360b48da8e \
|
|
||||||
--hash=sha256:22ffd29a63d71fb1b81552c21f2c2b734949b7ac751a9be70675a939a900839b \
|
|
||||||
--hash=sha256:2693b2728bbcc48d09a981a356954b0c47c53ff25b545856f28a889ea619f69a \
|
|
||||||
--hash=sha256:270bdcdaac5d5b6f73c5e22e7e135c7f2a50e789f71d9e241d5be8d90026e19a \
|
|
||||||
--hash=sha256:2711d29b653b3bce48a63d18b9c6b53274669e6d6c4094dddeb4d9a0e45128b2 \
|
|
||||||
--hash=sha256:2c16ab111bc27c646ba8aa005d0527754edc538ebb636f0b1bf8e244b48d1945 \
|
|
||||||
--hash=sha256:306ee1850d8105b5baf977e78d45fcadd12c1a54678d614c9baf217708446e91 \
|
|
||||||
--hash=sha256:3231c4c0e521dafa5be0c9f114ee2c2ad46650836f2d72caa86801950c3e7044 \
|
|
||||||
--hash=sha256:3890a6aa36e6baa53d5258a2a25d3ef8b37ad165a6ab27a892d7c3e3a432cd69 \
|
|
||||||
--hash=sha256:3a72c11530d71abfb66c8d7696a2f86c43e63fca8b948f1a784ac490f4ec688e \
|
|
||||||
--hash=sha256:3b5a6f40f0a1486b4b36c888123afc67acdbd9f33235927acf5ff295429a0ba3 \
|
|
||||||
--hash=sha256:3c91c210ae7645626c608400e3519b4a642f837cce09ca830db3beb2e9f274d4 \
|
|
||||||
--hash=sha256:3cd182d7291d29b92c521a0069d9c01ba6193628a9a105531d11b40a6d731a33 \
|
|
||||||
--hash=sha256:3e524c7874ac72884d28e16dd5b8d839fd09e0fe76b020d3fbca23212a7b8c52 \
|
|
||||||
--hash=sha256:3e93b2cd69a9830be33e03945cd7cda940a0a8bfcfbff41d6144f0cb0d3d8bd9 \
|
|
||||||
--hash=sha256:3edae8c5ddfdb6985d49ae9d150516e5076888879022f91a26c2de9276ce0bdb \
|
|
||||||
--hash=sha256:3f0e9ac28fc067d4d34b88ae43c48e9489455c97fee9633d851f7eeed5a05d35 \
|
|
||||||
--hash=sha256:42e75466f83cd43f6026c81eab74246efb2bdadafb307b85700632d06c68f299 \
|
|
||||||
--hash=sha256:44b32a7c4f0da3d28af31c259e38ddcff096f855e205ed0671d02fcf44f1ea1c \
|
|
||||||
--hash=sha256:457866b85daf5034296666168b84a69e0b2e89dc4f1af102b46f6448a60b9063 \
|
|
||||||
--hash=sha256:45bc6bccf78b20fd834237d18db64965d7ee68ba7f60440a26c7ab71e7b8d51a \
|
|
||||||
--hash=sha256:46d80bc76b51a6c24f9944368c28d38b8bcbcea1da4f2f8d3ebc31a67e8c6ec6 \
|
|
||||||
--hash=sha256:4793ef7f78268b124b73fa933440f01d258bbae01de9fa53e9080c9ab0425a12 \
|
|
||||||
--hash=sha256:492e5e428cbe126221611f47e068f01660352feec4ad18bc0f5ea9b2ae88fb14 \
|
|
||||||
--hash=sha256:4b26b03d9d2658ee2fa234f8f4f19f38a09773fe5261028025032e26d4d35af0 \
|
|
||||||
--hash=sha256:4c0d2cb595a420b34d5086db0add011e26e2c09d6a024afbac4228bf8f863a30 \
|
|
||||||
--hash=sha256:4cfaf02209061880210819934de2f4f6aa83dc04dafe6770276acc240a56da31 \
|
|
||||||
--hash=sha256:501909f2e4a1e2dee528ef766fe3c469060ebc17e54a8383d404ba07a81a6f02 \
|
|
||||||
--hash=sha256:50906f5aea24b5a865cbd0a589698288631d9f3a54c3a937c83aefa95a0d14af \
|
|
||||||
--hash=sha256:54ac2158a6f96cfbabff0b2eedaf94b90c5ec7ca8317fcadc61e1c2b2e0ff6ef \
|
|
||||||
--hash=sha256:56c6952a9b15047466d0c2347c446a761d4527f89976156341e68f0ce5cc08b0 \
|
|
||||||
--hash=sha256:56cd8b3f77d7b6812f533b662186a1f28316931166ddc00fb893b1b0db7e9888 \
|
|
||||||
--hash=sha256:57492a550a1d88d29d003247e5f78dd8cf04a701fac0e4c8db8745a6d2504e0a \
|
|
||||||
--hash=sha256:5943980471829f6de242a20b109de3111ba6b77e3af0ffc587028ac854b05e6c \
|
|
||||||
--hash=sha256:5c6ee90dee3e85e055ddfd502d611643d9b0fd94c818220bda84ec3dacd9b27b \
|
|
||||||
--hash=sha256:5c90e7fa02e8f5de0d10c17595c568ada48c5302e749462c0ea1a4c362111a86 \
|
|
||||||
--hash=sha256:5ce8943f79c2210f7abcc28e86367b03b28d95027fd01c46d2472373ae70c86f \
|
|
||||||
--hash=sha256:617f59cde379b4f648a09797b7f683d04b90a46344cddab85639da5aff0f5531 \
|
|
||||||
--hash=sha256:6307a0da524939decb8ca4a3933b8ab62525794411d6984fca6726e732804af6 \
|
|
||||||
--hash=sha256:684fd492fff4fead00587544e059be2bbcb6f93454f21fa2a91b66fc7508be82 \
|
|
||||||
--hash=sha256:6b5b393eda5ea42cca1c1a6665f2a4882b4fd5d1777e41ce0545a107fb008c9d \
|
|
||||||
--hash=sha256:6b723eb406dec5bc9ec516c73ab9c3239a3284e017f7eb89ee2b3258bd504fb7 \
|
|
||||||
--hash=sha256:6b9bf3135b4ad5981df9a73d71a35272d650a2985ae9c2746357b24d59de2448 \
|
|
||||||
--hash=sha256:6beb738155fe8ab8091afdfa5a3226b21c2b1593f1e50ebb90eb25b44dbc0391 \
|
|
||||||
--hash=sha256:6c0dbbcc19735fe5f8b0a54c07659d154a9e69f47e15d0a6ab7299215daf62cb \
|
|
||||||
--hash=sha256:6cdc537c8633d7fd92a82e2e0d2ab74320a3f63d5e59fb9cf08711e08fe151c4 \
|
|
||||||
--hash=sha256:6eae33003518fd4cb4f83a218d5371469dd3001aa3b87128c005b07762f7fe5e \
|
|
||||||
--hash=sha256:740d0a99cf9de0b17a3943388e9294a59becf75e7c43421f387bd3c7a9901f7c \
|
|
||||||
--hash=sha256:75c38c50ab9aca840225d9a9a3810bf11d04bd5c1f186cabbb8aee56db3e9b15 \
|
|
||||||
--hash=sha256:761fdae6728ceb99ab182fad2f0cc1e262f610834dc891aea1d1a2a2e634776f \
|
|
||||||
--hash=sha256:7664419f27db41d4f1c43a78dccda7dd6e8ef2428df3ee01d0c2a07a6b071297 \
|
|
||||||
--hash=sha256:76d3af9732d2dab69f28179b40ba2d87e2f1d5824b4a694780aa787d685e8f36 \
|
|
||||||
--hash=sha256:78326f4cb4427a56ba4996c0762b63be45f06b85f086526420d2b3a66e40f84d \
|
|
||||||
--hash=sha256:7868b85224291c6cb6759f9b5adb9745f486d226f62b16a614dd5a2a5ab2b35b \
|
|
||||||
--hash=sha256:815d26356930846a40c7bc1366e7b1b0320ab8a063e66c11298a208bed0fd237 \
|
|
||||||
--hash=sha256:8171b44a054e5c67fd748ada04187f1250bf35b95f85e52ab64bcf3331a923bb \
|
|
||||||
--hash=sha256:821b2755db9194409254012f429c56643416fb96ef9be090be82ec8826b7f477 \
|
|
||||||
--hash=sha256:837c6b305e26fe0f75b15c92cf3b2ba29e0ae19dc40b1c557b026cb426347d0c \
|
|
||||||
--hash=sha256:839dde845559254f34885267c6878f60d61d5205180226d976fe488d45fa128e \
|
|
||||||
--hash=sha256:84a6ecc0c940169190d2c23bd969debd48c94dbc855acd60188a68d71d421608 \
|
|
||||||
--hash=sha256:8601470267d938bcb7f3ab1a336100af51a4fd5b6ed030ef52461bb3ef5e7e07 \
|
|
||||||
--hash=sha256:88b5268892fde430d5531f95bc560b6efbbd67c929662c586afd729a96e7461c \
|
|
||||||
--hash=sha256:8aa5dda18d39b6143eb24809d158f9252c88f402749b6f1b62a506cc7d96cc35 \
|
|
||||||
--hash=sha256:926bdd3e3b5998ddf70cc64bc8cf57209571f9044542913afb673799fec77dd0 \
|
|
||||||
--hash=sha256:96beca19ec79de272e8668585380ff9092c47077c1d7a1e098e00bbd921f4785 \
|
|
||||||
--hash=sha256:9a0460d43603d1fd9ef59c30278531e15d78581721ddb538fa560aa7817ea4ad \
|
|
||||||
--hash=sha256:a03d57b86d2a51d0a66c92177e2be154ad015f357791d306e714569999cdb4cc \
|
|
||||||
--hash=sha256:a36b70596407634ca82d4b989a3729074a008537a0522e4c8046a67c729103e9 \
|
|
||||||
--hash=sha256:a3a52a3ba86436ab3aef510fbe21512abc2ddd1993005dfe50514bd2284ef025 \
|
|
||||||
--hash=sha256:a3dbc5ed9514908d5046107d7b1346bde71eea61de6e0e4919c19354f97e769f \
|
|
||||||
--hash=sha256:a431156bb41865fc14cd5d79bb9d7bbed83110b0159e34e62ae30951f96c0009 \
|
|
||||||
--hash=sha256:a575404ebc9cf2e91edd32eaf570ec1430eb900d4f56724ba7dd4bc1fc9c176d \
|
|
||||||
--hash=sha256:a5cf77eb04f20b720be95265a3e00eb2a14814074255cc27069c551b2db53118 \
|
|
||||||
--hash=sha256:a8763f20692da7df39b0afdd1ba3042b004c50a45994f76c2d9a25641f7673db \
|
|
||||||
--hash=sha256:ab4b2fda7c2b542f7f9d886cc6a838c5079d2b76f72e6081411faba11adde2c9 \
|
|
||||||
--hash=sha256:addeda51556dac7c1a2f14cda62db8b621cd12afba3091d03a96c72932387eab \
|
|
||||||
--hash=sha256:b242c27c8f836305a4a72df9cdd564386ac57b807bd252a063223331c9316b37 \
|
|
||||||
--hash=sha256:b4f062343e7ad3fa94f2c66e5ae667dee47ee74dd41a9057c4fbe163236a123d \
|
|
||||||
--hash=sha256:b5b8b0753718d258fd454283fbd57e14545d3b40583fa672e27cb4f987626bcc \
|
|
||||||
--hash=sha256:be3e47e2d91aa3942ff9bf4077a505226005abfc39b6f7554a91c1b9393986b9 \
|
|
||||||
--hash=sha256:befc2d6a953e563f8a7bfd87a42c22ebf8a3e980dcb7b6a4d17b70b0e914e8a3 \
|
|
||||||
--hash=sha256:bf35d0568abda97233239ce32896d3ad53fccc537832c104e30c94aa5fb93569 \
|
|
||||||
--hash=sha256:c933c6678c6f116ff8af47a4c6db0868b8ace74af0343016c0ef00f00272ea69 \
|
|
||||||
--hash=sha256:c9d1aca01f49170fdcf5c92761b1fafe97f554b721ca4570c5949fff778f0d4b \
|
|
||||||
--hash=sha256:cdeaa99ce822dca76cfb1b993e9120c5ea212f2eb66d48950ad63c349668a018 \
|
|
||||||
--hash=sha256:ce4d4f52e2a4324396caddbd45a97d8d7be5f42edd25d2355282a9c34f9b2f7f \
|
|
||||||
--hash=sha256:d1028417bb44037eb3069c1009bd7b7277212876cda22fbe565b0bca9fab6d2c \
|
|
||||||
--hash=sha256:d151e148117294133bf8af7eeace085e7e87432db15ab6adf640330298a47f6f \
|
|
||||||
--hash=sha256:d7841166b7fa64c9c56404617ae4341448847482d45933b13135d26c130519e5 \
|
|
||||||
--hash=sha256:d7fca4eb6df565e2a928f1c7dad92d27db8f9df0f449e76423ed5d7e713ed445 \
|
|
||||||
--hash=sha256:d95a354e02393eada6d7351184671aced9d4cce109dabf927cb7aa99624352a1 \
|
|
||||||
--hash=sha256:d9edf30457d74eebfd76b045535e36f1cd89062566a128a0db2145ca042d787e \
|
|
||||||
--hash=sha256:dbc2673f9223d420c91145599b3ba45a8a50c207d1976908e5fb5ddb0c9b9429 \
|
|
||||||
--hash=sha256:e01b3c878c8641913e688edd1b3f08658c6783d29cf6b826bd3c0d1ae7a1ffaa \
|
|
||||||
--hash=sha256:e21c1429e205828ea886a2293a4a2c8e01f4c25d9893ca330e97a6cf73f52e7b \
|
|
||||||
--hash=sha256:e43d4a1f673e8a1cbd8533e809e02b4bf9d4f2280269bb640436556312121250 \
|
|
||||||
--hash=sha256:e6d198bad4e49dd6732fbd636e2fc5c082f45c8cad0b4acb756b00c82c76072e \
|
|
||||||
--hash=sha256:e6ea1cda8d8c688278430e4268a42f5e5da3bdd74578dfadc0820c3f1766ce83 \
|
|
||||||
--hash=sha256:ea394a937f17a54c51239348bdbe2e3518124c8d4a8951ba04a311d3095bd18f \
|
|
||||||
--hash=sha256:eac2f5dbafd585dfe31f86a23ebf0d3ba480a9d49ebc87947267b5608d4ea0cd \
|
|
||||||
--hash=sha256:eb61be926bb81567c1f48bdc8aa22b9855048dc2efd53871f9f7e6e9a5632346 \
|
|
||||||
--hash=sha256:eba5d173f7d5708b22a93815017a4611873ed54db9f268077c0dd1ed99cfc858 \
|
|
||||||
--hash=sha256:ec450527cbf485e13c8d3602a54f428ab0432fdade0ede75efd74b735421c871 \
|
|
||||||
--hash=sha256:eef6a03b0b6d08d0835ccfa8ec8d1bc70525e3801387567137b50c557695e6da \
|
|
||||||
--hash=sha256:ef0d8c843e2827d6c120ab4687e9423fb1d893db1df27b7c1506615bcb9734a0 \
|
|
||||||
--hash=sha256:ef6b65b03247c54692ad4fd9ee97cb772781927db72e3cb05e70b3db6d1ff14f \
|
|
||||||
--hash=sha256:f3d6ed6a98cfd19155996605474982cc470d7601746a6439078f1a5a3fa8b050 \
|
|
||||||
--hash=sha256:fce4b85234a0cbad67bf8e6e1201ee815d172c9aebad75f25645bc4d834f8e31 \
|
|
||||||
--hash=sha256:fda1d96e542c37b6c804547dbf489c129fe7c97183a76a5ec275909ba1a063df \
|
|
||||||
--hash=sha256:fdcd198979b4ecffcc1beba366a7fbcf4eb41243691a82fe52ceb0b902f09c12 \
|
|
||||||
--hash=sha256:fe5ad0664ec772b02c45859041aa17655709cced7a31005817fbbbd988c25567
|
|
||||||
ruamel-yaml==0.19.1 \
|
|
||||||
--hash=sha256:27592957fedf6e0b62f281e96effd28043345e0e66001f97683aa9a40c667c93 \
|
|
||||||
--hash=sha256:53eb66cd27849eff968ebf8f0bf61f46cdac2da1d1f3576dd4ccee9b25c31993
|
|
||||||
ruamel-yaml-clib==0.2.15 \
|
|
||||||
--hash=sha256:014181cdec565c8745b7cbc4de3bf2cc8ced05183d986e6d1200168e5bb59490 \
|
|
||||||
--hash=sha256:04d21dc9c57d9608225da28285900762befbb0165ae48482c15d8d4989d4af14 \
|
|
||||||
--hash=sha256:05c70f7f86be6f7bee53794d80050a28ae7e13e4a0087c1839dcdefd68eb36b6 \
|
|
||||||
--hash=sha256:0ba6604bbc3dfcef844631932d06a1a4dcac3fee904efccf582261948431628a \
|
|
||||||
--hash=sha256:11e5499db1ccbc7f4b41f0565e4f799d863ea720e01d3e99fa0b7b5fcd7802c9 \
|
|
||||||
--hash=sha256:1b45498cc81a4724a2d42273d6cfc243c0547ad7c6b87b4f774cb7bcc131c98d \
|
|
||||||
--hash=sha256:1bb7b728fd9f405aa00b4a0b17ba3f3b810d0ccc5f77f7373162e9b5f0ff75d5 \
|
|
||||||
--hash=sha256:1f66f600833af58bea694d5892453f2270695b92200280ee8c625ec5a477eed3 \
|
|
||||||
--hash=sha256:27dc656e84396e6d687f97c6e65fb284d100483628f02d95464fd731743a4afe \
|
|
||||||
--hash=sha256:2812ff359ec1f30129b62372e5f22a52936fac13d5d21e70373dbca5d64bb97c \
|
|
||||||
--hash=sha256:2b216904750889133d9222b7b873c199d48ecbb12912aca78970f84a5aa1a4bc \
|
|
||||||
--hash=sha256:331fb180858dd8534f0e61aa243b944f25e73a4dae9962bd44c46d1761126bbf \
|
|
||||||
--hash=sha256:3cb75a3c14f1d6c3c2a94631e362802f70e83e20d1f2b2ef3026c05b415c4900 \
|
|
||||||
--hash=sha256:3eb199178b08956e5be6288ee0b05b2fb0b5c1f309725ad25d9c6ea7e27f962a \
|
|
||||||
--hash=sha256:424ead8cef3939d690c4b5c85ef5b52155a231ff8b252961b6516ed7cf05f6aa \
|
|
||||||
--hash=sha256:45702dfbea1420ba3450bb3dd9a80b33f0badd57539c6aac09f42584303e0db6 \
|
|
||||||
--hash=sha256:468858e5cbde0198337e6a2a78eda8c3fb148bdf4c6498eaf4bc9ba3f8e780bd \
|
|
||||||
--hash=sha256:46895c17ead5e22bea5e576f1db7e41cb273e8d062c04a6a49013d9f60996c25 \
|
|
||||||
--hash=sha256:46e4cc8c43ef6a94885f72512094e482114a8a706d3c555a34ed4b0d20200600 \
|
|
||||||
--hash=sha256:480894aee0b29752560a9de46c0e5f84a82602f2bc5c6cde8db9a345319acfdf \
|
|
||||||
--hash=sha256:4b293a37dc97e2b1e8a1aec62792d1e52027087c8eea4fc7b5abd2bdafdd6642 \
|
|
||||||
--hash=sha256:4be366220090d7c3424ac2b71c90d1044ea34fca8c0b88f250064fd06087e614 \
|
|
||||||
--hash=sha256:4d1032919280ebc04a80e4fb1e93f7a738129857eaec9448310e638c8bccefcf \
|
|
||||||
--hash=sha256:4d3b58ab2454b4747442ac76fab66739c72b1e2bb9bd173d7694b9f9dbc9c000 \
|
|
||||||
--hash=sha256:4dcec721fddbb62e60c2801ba08c87010bd6b700054a09998c4d09c08147b8fb \
|
|
||||||
--hash=sha256:512571ad41bba04eac7268fe33f7f4742210ca26a81fe0c75357fa682636c690 \
|
|
||||||
--hash=sha256:542d77b72786a35563f97069b9379ce762944e67055bea293480f7734b2c7e5e \
|
|
||||||
--hash=sha256:56ea19c157ed8c74b6be51b5fa1c3aff6e289a041575f0556f66e5fb848bb137 \
|
|
||||||
--hash=sha256:5d3c9210219cbc0f22706f19b154c9a798ff65a6beeafbf77fc9c057ec806f7d \
|
|
||||||
--hash=sha256:5fea0932358e18293407feb921d4f4457db837b67ec1837f87074667449f9401 \
|
|
||||||
--hash=sha256:617d35dc765715fa86f8c3ccdae1e4229055832c452d4ec20856136acc75053f \
|
|
||||||
--hash=sha256:64da03cbe93c1e91af133f5bec37fd24d0d4ba2418eaf970d7166b0a26a148a2 \
|
|
||||||
--hash=sha256:65f48245279f9bb301d1276f9679b82e4c080a1ae25e679f682ac62446fac471 \
|
|
||||||
--hash=sha256:6f1d38cbe622039d111b69e9ca945e7e3efebb30ba998867908773183357f3ed \
|
|
||||||
--hash=sha256:713cd68af9dfbe0bb588e144a61aad8dcc00ef92a82d2e87183ca662d242f524 \
|
|
||||||
--hash=sha256:71845d377c7a47afc6592aacfea738cc8a7e876d586dfba814501d8c53c1ba60 \
|
|
||||||
--hash=sha256:753faf20b3a5906faf1fc50e4ddb8c074cb9b251e00b14c18b28492f933ac8ef \
|
|
||||||
--hash=sha256:7e74ea87307303ba91073b63e67f2c667e93f05a8c63079ee5b7a5c8d0d7b043 \
|
|
||||||
--hash=sha256:88eea8baf72f0ccf232c22124d122a7f26e8a24110a0273d9bcddcb0f7e1fa03 \
|
|
||||||
--hash=sha256:923816815974425fbb1f1bf57e85eca6e14d8adc313c66db21c094927ad01815 \
|
|
||||||
--hash=sha256:9b6f7d74d094d1f3a4e157278da97752f16ee230080ae331fcc219056ca54f77 \
|
|
||||||
--hash=sha256:a8220fd4c6f98485e97aea65e1df76d4fed1678ede1fe1d0eed2957230d287c4 \
|
|
||||||
--hash=sha256:ab0df0648d86a7ecbd9c632e8f8d6b21bb21b5fc9d9e095c796cacf32a728d2d \
|
|
||||||
--hash=sha256:ac9b8d5fa4bb7fd2917ab5027f60d4234345fd366fe39aa711d5dca090aa1467 \
|
|
||||||
--hash=sha256:badd1d7283f3e5894779a6ea8944cc765138b96804496c91812b2829f70e18a7 \
|
|
||||||
--hash=sha256:bdc06ad71173b915167702f55d0f3f027fc61abd975bd308a0968c02db4a4c3e \
|
|
||||||
--hash=sha256:bf0846d629e160223805db9fe8cc7aec16aaa11a07310c50c8c7164efa440aec \
|
|
||||||
--hash=sha256:bfd309b316228acecfa30670c3887dcedf9b7a44ea39e2101e75d2654522acd4 \
|
|
||||||
--hash=sha256:c583229f336682b7212a43d2fa32c30e643d3076178fb9f7a6a14dde85a2d8bd \
|
|
||||||
--hash=sha256:cb15a2e2a90c8475df45c0949793af1ff413acfb0a716b8b94e488ea95ce7cff \
|
|
||||||
--hash=sha256:d290eda8f6ada19e1771b54e5706b8f9807e6bb08e873900d5ba114ced13e02c \
|
|
||||||
--hash=sha256:da3d6adadcf55a93c214d23941aef4abfd45652110aed6580e814152f385b862 \
|
|
||||||
--hash=sha256:dcc7f3162d3711fd5d52e2267e44636e3e566d1e5675a5f0b30e98f2c4af7974 \
|
|
||||||
--hash=sha256:def5663361f6771b18646620fca12968aae730132e104688766cf8a3b1d65922 \
|
|
||||||
--hash=sha256:e5e9f630c73a490b758bf14d859a39f375e6999aea5ddd2e2e9da89b9953486a \
|
|
||||||
--hash=sha256:e9fde97ecb7bb9c41261c2ce0da10323e9227555c674989f8d9eb7572fc2098d \
|
|
||||||
--hash=sha256:ef71831bd61fbdb7aa0399d5c4da06bea37107ab5c79ff884cc07f2450910262 \
|
|
||||||
--hash=sha256:f4421ab780c37210a07d138e56dd4b51f8642187cdfb433eb687fe8c11de0144 \
|
|
||||||
--hash=sha256:f6d3655e95a80325b84c4e14c080b2470fe4f33b6846f288379ce36154993fb1 \
|
|
||||||
--hash=sha256:fd4c928ddf6bce586285daa6d90680b9c291cfd045fc40aad34e445d57b1bf51 \
|
|
||||||
--hash=sha256:fe239bdfdae2302e93bd6e8264bd9b71290218fff7084a9db250b55caaccf43f
|
|
||||||
semantic-version==2.10.0 \
|
|
||||||
--hash=sha256:bdabb6d336998cbb378d4b9db3a4b56a1e3235701dc05ea2690d9a997ed5041c \
|
|
||||||
--hash=sha256:de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177
|
|
||||||
semgrep==1.184.0 \
|
|
||||||
--hash=sha256:0ce3064175a44236dd9fd35603627e3f56139ac61e13ca967bae2b76b2cec9bf \
|
|
||||||
--hash=sha256:0fc8a58e9a62de59ce644dde792dfc36764245d0139ab85632f66a8e0846a8c5 \
|
|
||||||
--hash=sha256:3c86b2961b4663d1338fb965de038c7869571661971b78e18e9346ab57e1e20a \
|
|
||||||
--hash=sha256:42a59e95433fd05a0908f8083e25656c90994c65549e483e0de8a1a0004a7adf \
|
|
||||||
--hash=sha256:cf82d77eb911f921902f3e9d098fb97604c5419c0a87cf7de7ab2944b05e2ceb \
|
|
||||||
--hash=sha256:d847abb8fb6fdde77d9e30a6bc869dbfcb68eff4142dcd77897c52635a7600d9 \
|
|
||||||
--hash=sha256:f794d7c6d33126b6881f80d069583ef35b52bd796d882a5fa249ce1124aba3f3
|
|
||||||
sse-starlette==3.7.0 \
|
|
||||||
--hash=sha256:326416da2ab52e9a41b3f409d3ff897eda45aa68c9f3b7b17d0913aab8d219c3 \
|
|
||||||
--hash=sha256:f1d3136caa12d129284fca3d2ded79bc9af943320b6472712955fea52a6d3eea
|
|
||||||
starlette==1.10.0 \
|
|
||||||
--hash=sha256:478c0ab3b4ced6e82719849c118fa406f0278a3499c1a898cd15cd31bdc38ce4 \
|
|
||||||
--hash=sha256:b8399098d4c1e3522734f7235dc79b1fc967f96cf139c81e0fa30479e0685f9b
|
|
||||||
structlog==26.1.0 \
|
|
||||||
--hash=sha256:e081a26d6c373e6d201eca24eede26d8ffab07f88f477822e679183428d3d91e \
|
|
||||||
--hash=sha256:f63a716cbd1b1291cf7661de7794b455acfa4c43c5bcf1630e6ad5ddc1adb3b7
|
|
||||||
tomli==2.4.1 \
|
|
||||||
--hash=sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853 \
|
|
||||||
--hash=sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe \
|
|
||||||
--hash=sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5 \
|
|
||||||
--hash=sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d \
|
|
||||||
--hash=sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd \
|
|
||||||
--hash=sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26 \
|
|
||||||
--hash=sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54 \
|
|
||||||
--hash=sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6 \
|
|
||||||
--hash=sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c \
|
|
||||||
--hash=sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a \
|
|
||||||
--hash=sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd \
|
|
||||||
--hash=sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f \
|
|
||||||
--hash=sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5 \
|
|
||||||
--hash=sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9 \
|
|
||||||
--hash=sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662 \
|
|
||||||
--hash=sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9 \
|
|
||||||
--hash=sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1 \
|
|
||||||
--hash=sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585 \
|
|
||||||
--hash=sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e \
|
|
||||||
--hash=sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c \
|
|
||||||
--hash=sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41 \
|
|
||||||
--hash=sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f \
|
|
||||||
--hash=sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085 \
|
|
||||||
--hash=sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15 \
|
|
||||||
--hash=sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7 \
|
|
||||||
--hash=sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c \
|
|
||||||
--hash=sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36 \
|
|
||||||
--hash=sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076 \
|
|
||||||
--hash=sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac \
|
|
||||||
--hash=sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8 \
|
|
||||||
--hash=sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232 \
|
|
||||||
--hash=sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece \
|
|
||||||
--hash=sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a \
|
|
||||||
--hash=sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897 \
|
|
||||||
--hash=sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d \
|
|
||||||
--hash=sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4 \
|
|
||||||
--hash=sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917 \
|
|
||||||
--hash=sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396 \
|
|
||||||
--hash=sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a \
|
|
||||||
--hash=sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc \
|
|
||||||
--hash=sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba \
|
|
||||||
--hash=sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f \
|
|
||||||
--hash=sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257 \
|
|
||||||
--hash=sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30 \
|
|
||||||
--hash=sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf \
|
|
||||||
--hash=sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9 \
|
|
||||||
--hash=sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049
|
|
||||||
typing-extensions==4.16.0 \
|
|
||||||
--hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 \
|
|
||||||
--hash=sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5
|
|
||||||
typing-inspection==0.4.5 \
|
|
||||||
--hash=sha256:7f16c411e7930dc79596d42ab44672a3fe5f60eb34b781a1647e7872363120c7 \
|
|
||||||
--hash=sha256:bc210535442b39e1bf2805e0c7a17dfd6a4ace760c84c7f7d16245d23a6b1c39
|
|
||||||
urllib3==2.8.0 \
|
|
||||||
--hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 \
|
|
||||||
--hash=sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63
|
|
||||||
uvicorn==0.54.0 \
|
|
||||||
--hash=sha256:505bdb0f318731d45f1f712071fc781a8981f6847a31c902c9f5e652d4f67faf \
|
|
||||||
--hash=sha256:a2e33cbfaa0306f8e6b0c13e0cb89d7d7a2da3e62b90c66e18c33d9807b28620
|
|
||||||
wcmatch==8.5.2 \
|
|
||||||
--hash=sha256:17d3ad3758f9d0b5b4dedc770b65420d4dac62e680229c287bf24c9db856a478 \
|
|
||||||
--hash=sha256:a70222b86dea82fb382dd87b73278c10756c138bd6f8f714e2183128887b9eb2
|
|
||||||
wrapt==1.17.3 \
|
|
||||||
--hash=sha256:02b551d101f31694fc785e58e0720ef7d9a10c4e62c1c9358ce6f63f23e30a56 \
|
|
||||||
--hash=sha256:042ec3bb8f319c147b1301f2393bc19dba6e176b7da446853406d041c36c7828 \
|
|
||||||
--hash=sha256:0610b46293c59a3adbae3dee552b648b984176f8562ee0dba099a56cfbe4df1f \
|
|
||||||
--hash=sha256:0b02e424deef65c9f7326d8c19220a2c9040c51dc165cddb732f16198c168396 \
|
|
||||||
--hash=sha256:0b1831115c97f0663cb77aa27d381237e73ad4f721391a9bfb2fe8bc25fa6e77 \
|
|
||||||
--hash=sha256:0ed61b7c2d49cee3c027372df5809a59d60cf1b6c2f81ee980a091f3afed6a2d \
|
|
||||||
--hash=sha256:0f5f51a6466667a5a356e6381d362d259125b57f059103dd9fdc8c0cf1d14139 \
|
|
||||||
--hash=sha256:16ecf15d6af39246fe33e507105d67e4b81d8f8d2c6598ff7e3ca1b8a37213f7 \
|
|
||||||
--hash=sha256:1f0b2f40cf341ee8cc1a97d51ff50dddb9fcc73241b9143ec74b30fc4f44f6cb \
|
|
||||||
--hash=sha256:1f23fa283f51c890eda8e34e4937079114c74b4c81d2b2f1f1d94948f5cc3d7f \
|
|
||||||
--hash=sha256:223db574bb38637e8230eb14b185565023ab624474df94d2af18f1cdb625216f \
|
|
||||||
--hash=sha256:249f88ed15503f6492a71f01442abddd73856a0032ae860de6d75ca62eed8067 \
|
|
||||||
--hash=sha256:24c2ed34dc222ed754247a2702b1e1e89fdbaa4016f324b4b8f1a802d4ffe87f \
|
|
||||||
--hash=sha256:273a736c4645e63ac582c60a56b0acb529ef07f78e08dc6bfadf6a46b19c0da7 \
|
|
||||||
--hash=sha256:281262213373b6d5e4bb4353bc36d1ba4084e6d6b5d242863721ef2bf2c2930b \
|
|
||||||
--hash=sha256:30ce38e66630599e1193798285706903110d4f057aab3168a34b7fdc85569afc \
|
|
||||||
--hash=sha256:33486899acd2d7d3066156b03465b949da3fd41a5da6e394ec49d271baefcf05 \
|
|
||||||
--hash=sha256:343e44b2a8e60e06a7e0d29c1671a0d9951f59174f3709962b5143f60a2a98bd \
|
|
||||||
--hash=sha256:373342dd05b1d07d752cecbec0c41817231f29f3a89aa8b8843f7b95992ed0c7 \
|
|
||||||
--hash=sha256:3af60380ba0b7b5aeb329bc4e402acd25bd877e98b3727b0135cb5c2efdaefe9 \
|
|
||||||
--hash=sha256:3e62d15d3cfa26e3d0788094de7b64efa75f3a53875cdbccdf78547aed547a81 \
|
|
||||||
--hash=sha256:41b1d2bc74c2cac6f9074df52b2efbef2b30bdfe5f40cb78f8ca22963bc62977 \
|
|
||||||
--hash=sha256:423ed5420ad5f5529db9ce89eac09c8a2f97da18eb1c870237e84c5a5c2d60aa \
|
|
||||||
--hash=sha256:46acc57b331e0b3bcb3e1ca3b421d65637915cfcd65eb783cb2f78a511193f9b \
|
|
||||||
--hash=sha256:4da9f45279fff3543c371d5ababc57a0384f70be244de7759c85a7f989cb4ebe \
|
|
||||||
--hash=sha256:507553480670cab08a800b9463bdb881b2edeed77dc677b0a5915e6106e91a58 \
|
|
||||||
--hash=sha256:53e5e39ff71b3fc484df8a522c933ea2b7cdd0d5d15ae82e5b23fde87d44cbd8 \
|
|
||||||
--hash=sha256:54a30837587c6ee3cd1a4d1c2ec5d24e77984d44e2f34547e2323ddb4e22eb77 \
|
|
||||||
--hash=sha256:5531d911795e3f935a9c23eb1c8c03c211661a5060aab167065896bbf62a5f85 \
|
|
||||||
--hash=sha256:55cbbc356c2842f39bcc553cf695932e8b30e30e797f961860afb308e6b1bb7c \
|
|
||||||
--hash=sha256:59923aa12d0157f6b82d686c3fd8e1166fa8cdfb3e17b42ce3b6147ff81528df \
|
|
||||||
--hash=sha256:5a03a38adec8066d5a37bea22f2ba6bbf39fcdefbe2d91419ab864c3fb515454 \
|
|
||||||
--hash=sha256:5a7b3c1ee8265eb4c8f1b7d29943f195c00673f5ab60c192eba2d4a7eae5f46a \
|
|
||||||
--hash=sha256:5d4478d72eb61c36e5b446e375bbc49ed002430d17cdec3cecb36993398e1a9e \
|
|
||||||
--hash=sha256:5ea5eb3c0c071862997d6f3e02af1d055f381b1d25b286b9d6644b79db77657c \
|
|
||||||
--hash=sha256:604d076c55e2fdd4c1c03d06dc1a31b95130010517b5019db15365ec4a405fc6 \
|
|
||||||
--hash=sha256:656873859b3b50eeebe6db8b1455e99d90c26ab058db8e427046dbc35c3140a5 \
|
|
||||||
--hash=sha256:65d1d00fbfb3ea5f20add88bbc0f815150dbbde3b026e6c24759466c8b5a9ef9 \
|
|
||||||
--hash=sha256:6b538e31eca1a7ea4605e44f81a48aa24c4632a277431a6ed3f328835901f4fd \
|
|
||||||
--hash=sha256:6fd1ad24dc235e4ab88cda009e19bf347aabb975e44fd5c2fb22a3f6e4141277 \
|
|
||||||
--hash=sha256:70d86fa5197b8947a2fa70260b48e400bf2ccacdcab97bb7de47e3d1e6312225 \
|
|
||||||
--hash=sha256:7171ae35d2c33d326ac19dd8facb1e82e5fd04ef8c6c0e394d7af55a55051c22 \
|
|
||||||
--hash=sha256:73d496de46cd2cdbdbcce4ae4bcdb4afb6a11234a1df9c085249d55166b95116 \
|
|
||||||
--hash=sha256:7425ac3c54430f5fc5e7b6f41d41e704db073309acfc09305816bc6a0b26bb16 \
|
|
||||||
--hash=sha256:74afa28374a3c3a11b3b5e5fca0ae03bef8450d6aa3ab3a1e2c30e3a75d023dc \
|
|
||||||
--hash=sha256:758895b01d546812d1f42204bd443b8c433c44d090248bf22689df673ccafe00 \
|
|
||||||
--hash=sha256:79573c24a46ce11aab457b472efd8d125e5a51da2d1d24387666cd85f54c05b2 \
|
|
||||||
--hash=sha256:7e18f01b0c3e4a07fe6dfdb00e29049ba17eadbc5e7609a2a3a4af83ab7d710a \
|
|
||||||
--hash=sha256:88547535b787a6c9ce4086917b6e1d291aa8ed914fdd3a838b3539dc95c12804 \
|
|
||||||
--hash=sha256:88bbae4d40d5a46142e70d58bf664a89b6b4befaea7b2ecc14e03cedb8e06c04 \
|
|
||||||
--hash=sha256:8cccf4f81371f257440c88faed6b74f1053eef90807b77e31ca057b2db74edb1 \
|
|
||||||
--hash=sha256:9baa544e6acc91130e926e8c802a17f3b16fbea0fd441b5a60f5cf2cc5c3deba \
|
|
||||||
--hash=sha256:a36692b8491d30a8c75f1dfee65bef119d6f39ea84ee04d9f9311f83c5ad9390 \
|
|
||||||
--hash=sha256:a47681378a0439215912ef542c45a783484d4dd82bac412b71e59cf9c0e1cea0 \
|
|
||||||
--hash=sha256:a7c06742645f914f26c7f1fa47b8bc4c91d222f76ee20116c43d5ef0912bba2d \
|
|
||||||
--hash=sha256:a9a2203361a6e6404f80b99234fe7fb37d1fc73487b5a78dc1aa5b97201e0f22 \
|
|
||||||
--hash=sha256:ab232e7fdb44cdfbf55fc3afa31bcdb0d8980b9b95c38b6405df2acb672af0e0 \
|
|
||||||
--hash=sha256:ad85e269fe54d506b240d2d7b9f5f2057c2aa9a2ea5b32c66f8902f768117ed2 \
|
|
||||||
--hash=sha256:af338aa93554be859173c39c85243970dc6a289fa907402289eeae7543e1ae18 \
|
|
||||||
--hash=sha256:afd964fd43b10c12213574db492cb8f73b2f0826c8df07a68288f8f19af2ebe6 \
|
|
||||||
--hash=sha256:b32888aad8b6e68f83a8fdccbf3165f5469702a7544472bdf41f582970ed3311 \
|
|
||||||
--hash=sha256:c31eebe420a9a5d2887b13000b043ff6ca27c452a9a22fa71f35f118e8d4bf89 \
|
|
||||||
--hash=sha256:caea3e9c79d5f0d2c6d9ab96111601797ea5da8e6d0723f77eabb0d4068d2b2f \
|
|
||||||
--hash=sha256:cf30f6e3c077c8e6a9a7809c94551203c8843e74ba0c960f4a98cd80d4665d39 \
|
|
||||||
--hash=sha256:d40770d7c0fd5cbed9d84b2c3f2e156431a12c9a37dc6284060fb4bec0b7ffd4 \
|
|
||||||
--hash=sha256:d8a210b158a34164de8bb68b0e7780041a903d7b00c87e906fb69928bf7890d5 \
|
|
||||||
--hash=sha256:dc4a8d2b25efb6681ecacad42fca8859f88092d8732b170de6a5dddd80a1c8fa \
|
|
||||||
--hash=sha256:df7d30371a2accfe4013e90445f6388c570f103d61019b6b7c57e0265250072a \
|
|
||||||
--hash=sha256:e01375f275f010fcbf7f643b4279896d04e571889b8a5b3f848423d91bf07050 \
|
|
||||||
--hash=sha256:e1a4120ae5705f673727d3253de3ed0e016f7cd78dc463db1b31e2463e1f3cf6 \
|
|
||||||
--hash=sha256:e228514a06843cae89621384cfe3a80418f3c04aadf8a3b14e46a7be704e4235 \
|
|
||||||
--hash=sha256:e405adefb53a435f01efa7ccdec012c016b5a1d3f35459990afc39b6be4d5056 \
|
|
||||||
--hash=sha256:e6b13af258d6a9ad602d57d889f83b9d5543acd471eee12eb51f5b01f8eb1bc2 \
|
|
||||||
--hash=sha256:e6f40a8aa5a92f150bdb3e1c44b7e98fb7113955b2e5394122fa5532fec4b418 \
|
|
||||||
--hash=sha256:e71d5c6ebac14875668a1e90baf2ea0ef5b7ac7918355850c0908ae82bcb297c \
|
|
||||||
--hash=sha256:ed7c635ae45cfbc1a7371f708727bf74690daedc49b4dba310590ca0bd28aa8a \
|
|
||||||
--hash=sha256:f38e60678850c42461d4202739f9bf1e3a737c7ad283638251e79cc49effb6b6 \
|
|
||||||
--hash=sha256:f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0 \
|
|
||||||
--hash=sha256:f9b2601381be482f70e5d1051a5965c25fb3625455a2bf520b5a077b22afb775 \
|
|
||||||
--hash=sha256:fbd3c8319de8e1dc79d346929cd71d523622da527cca14e0c1d257e31c2b8b10 \
|
|
||||||
--hash=sha256:fd341868a4b6714a5962c1af0bd44f7c404ef78720c7de4892901e540417111c
|
|
||||||
zipp==4.1.2 \
|
|
||||||
--hash=sha256:b30cb6cd253122169c47de245ca24a86bac2a5d3802ba15bf7ba6414eb9e144d \
|
|
||||||
--hash=sha256:cf474b90b07ea932637e17c6b9479de2b2882900b0d311bdaf4f5c000a15a97f
|
|
||||||
@@ -1,60 +1,24 @@
|
|||||||
# generate Bazel BUILD file
|
# generate Bazel BUILD file
|
||||||
#
|
|
||||||
# usage: cmake -P cmake/scripts/gen_bazel_build_file.cmake (or: make BUILD.bazel)
|
|
||||||
#
|
|
||||||
# The header list of the "json" target is derived from the files in include/. Everything else is fixed text below,
|
|
||||||
# so edit this script rather than BUILD.bazel.
|
|
||||||
|
|
||||||
get_filename_component(PROJECT_ROOT "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
|
set(PROJECT_ROOT "${CMAKE_CURRENT_LIST_DIR}/../..")
|
||||||
set(BUILD_FILE "${PROJECT_ROOT}/BUILD.bazel")
|
set(BUILD_FILE "${PROJECT_ROOT}/BUILD.bazel")
|
||||||
|
|
||||||
file(GLOB_RECURSE HEADERS LIST_DIRECTORIES false RELATIVE "${PROJECT_ROOT}" "${PROJECT_ROOT}/include/*.hpp")
|
file(GLOB_RECURSE HEADERS LIST_DIRECTORIES false RELATIVE "${PROJECT_ROOT}" "include/*.hpp")
|
||||||
list(SORT HEADERS)
|
|
||||||
|
|
||||||
set(CONTENT [=[
|
|
||||||
load("@rules_cc//cc:cc_library.bzl", "cc_library")
|
|
||||||
load("@rules_license//rules:license.bzl", "license")
|
|
||||||
|
|
||||||
package(
|
|
||||||
default_applicable_licenses = [":license"],
|
|
||||||
)
|
|
||||||
|
|
||||||
exports_files([
|
|
||||||
"LICENSE.MIT",
|
|
||||||
])
|
|
||||||
|
|
||||||
license(
|
|
||||||
name = "license",
|
|
||||||
license_kinds = ["@rules_license//licenses/spdx:MIT"],
|
|
||||||
license_text = "LICENSE.MIT",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
file(WRITE "${BUILD_FILE}" [=[
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "json",
|
name = "json",
|
||||||
hdrs = [
|
hdrs = [
|
||||||
]=])
|
]=])
|
||||||
|
|
||||||
foreach(header ${HEADERS})
|
foreach(header ${HEADERS})
|
||||||
string(APPEND CONTENT " \"${header}\",\n")
|
file(APPEND "${BUILD_FILE}" " \"${header}\",\n")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
string(APPEND CONTENT [=[
|
file(APPEND "${BUILD_FILE}" [=[
|
||||||
],
|
],
|
||||||
includes = ["include"],
|
includes = ["include"],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
alwayslink = True,
|
||||||
|
|
||||||
cc_library(
|
|
||||||
name = "singleheader-json",
|
|
||||||
hdrs = [
|
|
||||||
"single_include/nlohmann/json.hpp",
|
|
||||||
"single_include/nlohmann/json_fwd.hpp",
|
|
||||||
"single_include/nlohmann/json_literals.hpp",
|
|
||||||
"single_include/nlohmann/json_view.hpp",
|
|
||||||
],
|
|
||||||
includes = ["single_include"],
|
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
)
|
)
|
||||||
]=])
|
]=])
|
||||||
|
|
||||||
file(WRITE "${BUILD_FILE}" "${CONTENT}")
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
# Shared extractor for the JSON_HEDLEY_* macro names defined in hedley.hpp.
|
|
||||||
#
|
|
||||||
# Every macro that hedley.hpp #defines must be #undef-ed again once json.hpp
|
|
||||||
# has been fully processed (see include/nlohmann/detail/macro_unscope.hpp
|
|
||||||
# and https://github.com/nlohmann/json/issues/5408). Deriving the macro list
|
|
||||||
# straight from hedley.hpp here -- instead of hand-maintaining it in two
|
|
||||||
# places -- means hedley_undef.hpp and the regression test that checks for
|
|
||||||
# leaked macros can never drift apart, even after a future `make
|
|
||||||
# update_hedley` pulls in new macros from upstream Hedley.
|
|
||||||
#
|
|
||||||
# MODE=undef (default): write hedley_undef.hpp (SPDX header, #pragma once,
|
|
||||||
# one #undef per macro name) -- used by `make update_hedley_undef`
|
|
||||||
# MODE=checks: write one #ifdef/FAIL_CHECK/#endif per macro name,
|
|
||||||
# meant to be #include-d inside a TEST_CASE -- used by
|
|
||||||
# tests/CMakeLists.txt to (re)generate the include for
|
|
||||||
# tests/src/unit-no-macro-leak.cpp
|
|
||||||
#
|
|
||||||
# Required variables:
|
|
||||||
# HEDLEY_HPP path to include/nlohmann/thirdparty/hedley/hedley.hpp
|
|
||||||
# OUTPUT path of the file to (over)write
|
|
||||||
# Optional:
|
|
||||||
# MODE "undef" (default) or "checks"
|
|
||||||
|
|
||||||
if(NOT DEFINED HEDLEY_HPP OR NOT DEFINED OUTPUT)
|
|
||||||
message(FATAL_ERROR "HEDLEY_HPP and OUTPUT must be set")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT EXISTS "${HEDLEY_HPP}")
|
|
||||||
message(FATAL_ERROR "Hedley header not found: ${HEDLEY_HPP}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT DEFINED MODE)
|
|
||||||
set(MODE undef)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT MODE STREQUAL "undef" AND NOT MODE STREQUAL "checks")
|
|
||||||
message(FATAL_ERROR "MODE must be undef or checks, got: ${MODE}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Line-anchored, like `grep -oE "^[[:blank:]]*#[[:blank:]]*define[[:blank:]]+JSON_HEDLEY_[A-Za-z0-9_]+"`.
|
|
||||||
# Unanchored matching would also pick up JSON_HEDLEY_* mentions inside
|
|
||||||
# comments or string literals elsewhere in the file, which must not turn
|
|
||||||
# into #undef lines.
|
|
||||||
file(STRINGS "${HEDLEY_HPP}" hedley_lines)
|
|
||||||
set(macro_names)
|
|
||||||
foreach(line IN LISTS hedley_lines)
|
|
||||||
if("${line}" MATCHES "^[ \t]*#[ \t]*define[ \t]+(JSON_HEDLEY_[A-Za-z0-9_]+)")
|
|
||||||
list(APPEND macro_names "${CMAKE_MATCH_1}")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
if(NOT macro_names)
|
|
||||||
message(FATAL_ERROR "No JSON_HEDLEY_* macros found in ${HEDLEY_HPP}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
list(REMOVE_DUPLICATES macro_names)
|
|
||||||
# Lexicographic, locale-independent (ASCII-only names) -- matches `LC_ALL=C sort`.
|
|
||||||
list(SORT macro_names COMPARE STRING)
|
|
||||||
list(LENGTH macro_names macro_count)
|
|
||||||
|
|
||||||
set(generated "")
|
|
||||||
if(MODE STREQUAL "undef")
|
|
||||||
# Same banner `make update_hedley_undef` would stamp by hand, so the
|
|
||||||
# recipe is self-contained and its output is byte-stable across reruns.
|
|
||||||
# The embedded SPDX tags below are part of the *generated* file's
|
|
||||||
# content, not a REUSE header for this .cmake script itself (which is
|
|
||||||
# already covered by the blanket path = "**" rule in REUSE.toml) -- keep
|
|
||||||
# them wrapped in REUSE-IgnoreStart/End so `reuse lint` does not try to
|
|
||||||
# parse "MIT\n")" as this file's own SPDX-License-Identifier value.
|
|
||||||
# REUSE-IgnoreStart
|
|
||||||
string(APPEND generated "// __ _____ _____ _____\n")
|
|
||||||
string(APPEND generated "// __| | __| | | | JSON for Modern C++\n")
|
|
||||||
string(APPEND generated "// | | |__ | | | | | | version 3.12.0\n")
|
|
||||||
string(APPEND generated "// |_____|_____|_____|_|___| https://github.com/nlohmann/json\n")
|
|
||||||
string(APPEND generated "//\n")
|
|
||||||
string(APPEND generated "// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>\n")
|
|
||||||
string(APPEND generated "// SPDX-License-Identifier: MIT\n")
|
|
||||||
# REUSE-IgnoreEnd
|
|
||||||
string(APPEND generated "\n")
|
|
||||||
string(APPEND generated "#pragma once\n")
|
|
||||||
string(APPEND generated "\n")
|
|
||||||
foreach(name IN LISTS macro_names)
|
|
||||||
string(APPEND generated "#undef ${name}\n")
|
|
||||||
endforeach()
|
|
||||||
else()
|
|
||||||
string(APPEND generated "// This file is generated by cmake/scripts/gen_hedley_undef_check.cmake\n")
|
|
||||||
string(APPEND generated "// from include/nlohmann/thirdparty/hedley/hedley.hpp. Do not edit it by\n")
|
|
||||||
string(APPEND generated "// hand -- it is regenerated on every build. ${macro_count} macros checked.\n\n")
|
|
||||||
foreach(name IN LISTS macro_names)
|
|
||||||
string(APPEND generated "#ifdef ${name}\n")
|
|
||||||
string(APPEND generated " FAIL_CHECK(\"${name} leaked after including nlohmann/json.hpp\");\n")
|
|
||||||
string(APPEND generated "#endif\n")
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
get_filename_component(output_dir "${OUTPUT}" DIRECTORY)
|
|
||||||
if(output_dir)
|
|
||||||
file(MAKE_DIRECTORY "${output_dir}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Avoid rewriting the file (and busting downstream incremental rebuilds)
|
|
||||||
# when the content has not actually changed.
|
|
||||||
set(write_output TRUE)
|
|
||||||
if(EXISTS "${OUTPUT}")
|
|
||||||
file(READ "${OUTPUT}" existing_content)
|
|
||||||
if(existing_content STREQUAL generated)
|
|
||||||
set(write_output FALSE)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
if(write_output)
|
|
||||||
file(WRITE "${OUTPUT}" "${generated}")
|
|
||||||
endif()
|
|
||||||
+5
-7
@@ -35,8 +35,6 @@ foreach(feature ${CMAKE_CXX_COMPILE_FEATURES})
|
|||||||
set(compiler_supports_cpp_20 TRUE)
|
set(compiler_supports_cpp_20 TRUE)
|
||||||
elseif (${feature} STREQUAL cxx_std_23)
|
elseif (${feature} STREQUAL cxx_std_23)
|
||||||
set(compiler_supports_cpp_23 TRUE)
|
set(compiler_supports_cpp_23 TRUE)
|
||||||
elseif (${feature} STREQUAL cxx_std_26)
|
|
||||||
set(compiler_supports_cpp_26 TRUE)
|
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
@@ -94,6 +92,7 @@ function(json_test_set_test_options tests)
|
|||||||
target_compile_options(${test_interface} INTERFACE ${args_COMPILE_OPTIONS})
|
target_compile_options(${test_interface} INTERFACE ${args_COMPILE_OPTIONS})
|
||||||
target_link_libraries (${test_interface} INTERFACE ${args_LINK_LIBRARIES})
|
target_link_libraries (${test_interface} INTERFACE ${args_LINK_LIBRARIES})
|
||||||
target_link_options(${test_interface} INTERFACE ${args_LINK_OPTIONS})
|
target_link_options(${test_interface} INTERFACE ${args_LINK_OPTIONS})
|
||||||
|
#set_target_properties(${test_interface} PROPERTIES JSON_TEST_PROPERTIES "${args_TEST_PROPERTIES}")
|
||||||
set_property(DIRECTORY PROPERTY
|
set_property(DIRECTORY PROPERTY
|
||||||
${test_interface}_TEST_PROPERTIES "${args_TEST_PROPERTIES}"
|
${test_interface}_TEST_PROPERTIES "${args_TEST_PROPERTIES}"
|
||||||
)
|
)
|
||||||
@@ -103,6 +102,7 @@ endfunction()
|
|||||||
|
|
||||||
# for internal use by _json_test_add_test()
|
# for internal use by _json_test_add_test()
|
||||||
function(_json_test_apply_test_properties test_target properties_target)
|
function(_json_test_apply_test_properties test_target properties_target)
|
||||||
|
#get_target_property(test_properties ${properties_target} JSON_TEST_PROPERTIES)
|
||||||
get_property(test_properties DIRECTORY PROPERTY ${properties_target}_TEST_PROPERTIES)
|
get_property(test_properties DIRECTORY PROPERTY ${properties_target}_TEST_PROPERTIES)
|
||||||
if(test_properties)
|
if(test_properties)
|
||||||
set_tests_properties(${test_target} PROPERTIES ${test_properties})
|
set_tests_properties(${test_target} PROPERTIES ${test_properties})
|
||||||
@@ -178,10 +178,8 @@ function(_json_test_add_test test_name file main cxx_standard)
|
|||||||
COMMAND ${memcheck_command} $<TARGET_FILE:${test_target}> ${DOCTEST_TEST_FILTER}
|
COMMAND ${memcheck_command} $<TARGET_FILE:${test_target}> ${DOCTEST_TEST_FILTER}
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
# under Valgrind the slowest tests take close to 25 minutes, so ctest's
|
|
||||||
# default timeout of 1500 seconds leaves no headroom
|
|
||||||
set_tests_properties(${test_target}_valgrind PROPERTIES
|
set_tests_properties(${test_target}_valgrind PROPERTIES
|
||||||
LABELS "valgrind" FIXTURES_REQUIRED TEST_DATA TIMEOUT 3600
|
LABELS "valgrind" FIXTURES_REQUIRED TEST_DATA
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
@@ -215,10 +213,10 @@ function(json_test_add_test_for file)
|
|||||||
|
|
||||||
if("${args_NAME}" STREQUAL "")
|
if("${args_NAME}" STREQUAL "")
|
||||||
get_filename_component(file_basename ${file} NAME_WE)
|
get_filename_component(file_basename ${file} NAME_WE)
|
||||||
string(REGEX REPLACE "unit-(.+)" "test-\\1" test_name ${file_basename})
|
string(REGEX REPLACE "unit-([^$]+)" "test-\\1" test_name ${file_basename})
|
||||||
else()
|
else()
|
||||||
set(test_name ${args_NAME})
|
set(test_name ${args_NAME})
|
||||||
if(NOT test_name MATCHES "test-.+")
|
if(NOT test_name MATCHES "test-[^$]+")
|
||||||
message(FATAL_ERROR "Test name must start with 'test-'.")
|
message(FATAL_ERROR "Test name must start with 'test-'.")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
+7
-19
@@ -11,31 +11,20 @@ EXAMPLES = $(wildcard mkdocs/docs/examples/*.cpp)
|
|||||||
|
|
||||||
cxx_standard = $(lastword c++11 $(filter c++%, $(subst ., ,$1)))
|
cxx_standard = $(lastword c++11 $(filter c++%, $(subst ., ,$1)))
|
||||||
|
|
||||||
# common compile flags for the stand-alone example files
|
|
||||||
EXAMPLE_CPPFLAGS = -I $(SRCDIR) -DJSON_USE_GLOBAL_UDLS=0
|
|
||||||
EXAMPLE_WARNFLAGS = -Werror=deprecated-declarations
|
|
||||||
|
|
||||||
# examples that document deprecated API and are allowed to use it
|
|
||||||
DEPRECATED_EXAMPLES = $(addprefix mkdocs/docs/examples/, \
|
|
||||||
json_pointer__operator__equal_stringtype \
|
|
||||||
json_pointer__operator__notequal_stringtype \
|
|
||||||
json_pointer__operator_string_t)
|
|
||||||
$(DEPRECATED_EXAMPLES:=.output) $(DEPRECATED_EXAMPLES:=.test): EXAMPLE_WARNFLAGS = -Wno-deprecated-declarations
|
|
||||||
|
|
||||||
# create output from a stand-alone example file
|
# create output from a stand-alone example file
|
||||||
%.output: %.cpp
|
%.output: %.cpp
|
||||||
@echo "standard $(call cxx_standard,$(<:.cpp=))"
|
@echo "standard $(call cxx_standard $(<:.cpp=))"
|
||||||
$(MAKE) $(<:.cpp=) \
|
$(MAKE) $(<:.cpp=) \
|
||||||
CPPFLAGS="$(EXAMPLE_CPPFLAGS)" \
|
CPPFLAGS="-I $(SRCDIR) -DJSON_USE_GLOBAL_UDLS=0" \
|
||||||
CXXFLAGS="-std=$(call cxx_standard,$(<:.cpp=)) $(EXAMPLE_WARNFLAGS)"
|
CXXFLAGS="-std=$(call cxx_standard,$(<:.cpp=)) -Wno-deprecated-declarations"
|
||||||
./$(<:.cpp=) > $@
|
./$(<:.cpp=) > $@
|
||||||
rm $(<:.cpp=)
|
rm $(<:.cpp=)
|
||||||
|
|
||||||
# compare created output with current output of the example files
|
# compare created output with current output of the example files
|
||||||
%.test: %.cpp
|
%.test: %.cpp
|
||||||
$(MAKE) $(<:.cpp=) \
|
$(MAKE) $(<:.cpp=) \
|
||||||
CPPFLAGS="$(EXAMPLE_CPPFLAGS)" \
|
CPPFLAGS="-I $(SRCDIR) -DJSON_USE_GLOBAL_UDLS=0" \
|
||||||
CXXFLAGS="-std=$(call cxx_standard,$(<:.cpp=)) $(EXAMPLE_WARNFLAGS)"
|
CXXFLAGS="-std=$(call cxx_standard,$(<:.cpp=)) -Wno-deprecated-declarations"
|
||||||
./$(<:.cpp=) > $@
|
./$(<:.cpp=) > $@
|
||||||
diff $@ $(<:.cpp=.output)
|
diff $@ $(<:.cpp=.output)
|
||||||
rm $(<:.cpp=) $@
|
rm $(<:.cpp=) $@
|
||||||
@@ -46,10 +35,9 @@ create_output: $(EXAMPLES:.cpp=.output)
|
|||||||
# check output of all stand-alone example files
|
# check output of all stand-alone example files
|
||||||
check_output: $(EXAMPLES:.cpp=.test)
|
check_output: $(EXAMPLES:.cpp=.test)
|
||||||
|
|
||||||
# check output of all stand-alone example files (exclude files whose output depends on the platform by nature:
|
# check output of all stand-alone example files (exclude files with platform-dependent output.)
|
||||||
# library and compiler information, container size limits, and hash values)
|
|
||||||
# This target is used in the CI (ci_test_documentation).
|
# This target is used in the CI (ci_test_documentation).
|
||||||
check_output_portable: $(filter-out mkdocs/docs/examples/meta.test mkdocs/docs/examples/max_size.test mkdocs/docs/examples/std_hash.test,$(EXAMPLES:.cpp=.test))
|
check_output_portable: $(filter-out mkdocs/docs/examples/meta.test mkdocs/docs/examples/max_size.test mkdocs/docs/examples/std_hash.test mkdocs/docs/examples/basic_json__CompatibleType.test,$(EXAMPLES:.cpp=.test))
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -fr $(EXAMPLES:.cpp=)
|
rm -fr $(EXAMPLES:.cpp=)
|
||||||
|
|||||||
+8
-11
@@ -2,22 +2,19 @@
|
|||||||
|
|
||||||
## Generate documentation
|
## Generate documentation
|
||||||
|
|
||||||
Note on documentation: The source files contain links to the online documentation at https://json.nlohmann.me.
|
Note on documentation: The source files contain links to the online documentation at https://json.nlohmann.me. This URL
|
||||||
This URL provides the most recent documentation and also applies to previous versions. Documentation for deprecated
|
contains the most recent documentation and should also be applicable to previous versions; documentation for deprecated
|
||||||
functions is not removed; instead, it is marked as deprecated.
|
functions is not removed, but marked deprecated.
|
||||||
|
|
||||||
If you want to view the documentation for a specific tag or commit hash, you can generate it locally as follows (example
|
If you want to see the documentation for a specific tag or commit hash, you can generate it as follows (here for tag
|
||||||
using tag `v3.12.0`):
|
`v3.10.2`):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
git clone https://github.com/nlohmann/json.git
|
git clone https://github.com/nlohmann/json.git
|
||||||
cd json
|
cd json
|
||||||
git checkout v3.12.0
|
git checkout v3.10.2
|
||||||
make install_venv serve -C docs/mkdocs
|
make install_venv serve -C docs/mkdocs
|
||||||
```
|
```
|
||||||
|
|
||||||
Open <http://127.0.0.1:8000/> in your browser. Replace any URL in the source code that points to
|
Open URL <http://127.0.0.1:8000/> in your browser. Replace from any URL from the source code `https://json.nlohmann.me`
|
||||||
`https://json.nlohmann.me` with `http://127.0.0.1:8000` to view the documentation for the selected tag or commit hash.
|
with `http://127.0.0.1:8000` to see the documentation for your tag or commit hash.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<key>dashIndexFilePath</key>
|
<key>dashIndexFilePath</key>
|
||||||
<string>index.html</string>
|
<string>index.html</string>
|
||||||
<key>DashDocSetFallbackURL</key>
|
<key>DashDocSetFallbackURL</key>
|
||||||
<string>https://json.nlohmann.me/</string>
|
<string>https://nlohmann.github.io/json/</string>
|
||||||
<key>isJavaScriptEnabled</key>
|
<key>isJavaScriptEnabled</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
|
|||||||
+65
-11
@@ -1,24 +1,48 @@
|
|||||||
SHELL=/usr/bin/env bash
|
SHELL=/usr/bin/env bash
|
||||||
PYTHON=../mkdocs/venv/bin/python3
|
SED ?= $(shell which gsed 2>/dev/null || which sed)
|
||||||
|
|
||||||
|
MKDOCS_PAGES=$(shell cd ../mkdocs/docs/ && find * -type f -name '*.md' | sort)
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: JSON_for_Modern_C++.tgz
|
all: JSON_for_Modern_C++.tgz
|
||||||
|
|
||||||
# generate the search index (the docset target does this itself, this is
|
docSet.dsidx: docSet.sql
|
||||||
# only handy for inspecting the index)
|
# generate index
|
||||||
docSet.dsidx: generate_docset.py
|
sqlite3 docSet.dsidx <docSet.sql
|
||||||
$(PYTHON) generate_docset.py index docSet.dsidx
|
|
||||||
|
|
||||||
# build the documentation and turn it into a self-contained docset
|
JSON_for_Modern_C++.docset: Info.plist docSet.dsidx
|
||||||
.PHONY: JSON_for_Modern_C++.docset
|
rm -fr JSON_for_Modern_C++.docset JSON_for_Modern_C++.tgz
|
||||||
JSON_for_Modern_C++.docset:
|
mkdir -p JSON_for_Modern_C++.docset/Contents/Resources/Documents/
|
||||||
|
cp icon*.png JSON_for_Modern_C++.docset
|
||||||
|
cp Info.plist JSON_for_Modern_C++.docset/Contents
|
||||||
|
# build and copy documentation
|
||||||
$(MAKE) install_venv -C ../mkdocs
|
$(MAKE) install_venv -C ../mkdocs
|
||||||
$(MAKE) build -C ../mkdocs
|
$(MAKE) build -C ../mkdocs
|
||||||
$(PYTHON) generate_docset.py docset ../mkdocs/site .
|
cp -r ../mkdocs/site/* JSON_for_Modern_C++.docset/Contents/Resources/Documents
|
||||||
|
# patch CSS to hide navigation items
|
||||||
|
echo -e "\n\nheader, footer, nav.md-tabs, nav.md-tabs--active, div.md-sidebar--primary, a.md-content__button { display: none; }" >> "$$(ls JSON_for_Modern_C++.docset/Contents/Resources/Documents/assets/stylesheets/main.*.min.css)"
|
||||||
|
# fix spacing
|
||||||
|
echo -e "\n\ndiv.md-sidebar div.md-sidebar--secondary, div.md-main__inner { top: 0; margin-top: 0 }" >> "$$(ls JSON_for_Modern_C++.docset/Contents/Resources/Documents/assets/stylesheets/main.*.min.css)"
|
||||||
|
# remove "JSON for Modern C++" from page titles (fallback)
|
||||||
|
find JSON_for_Modern_C++.docset/Contents/Resources/Documents -type f -exec $(SED) -i 's| - JSON for Modern C++</title>|</title>|' {} +
|
||||||
|
# replace page titles with name from index, if available
|
||||||
|
for page in $(MKDOCS_PAGES); do \
|
||||||
|
case "$$page" in \
|
||||||
|
*/index.md) path=$${page/\/index.md/} ;; \
|
||||||
|
*) path=$${page/.md/} ;; \
|
||||||
|
esac; \
|
||||||
|
title=$$(sqlite3 docSet.dsidx "SELECT name FROM searchIndex WHERE path='$$path/index.html'" | tr '\n' ',' | $(SED) -e 's/,/, /g' -e 's/, $$/\n/'); \
|
||||||
|
if [ "x$$title" != "x" ]; then \
|
||||||
|
$(SED) -i "s%<title>.*</title>%<title>$$title</title>%" "JSON_for_Modern_C++.docset/Contents/Resources/Documents/$$path/index.html"; \
|
||||||
|
fi \
|
||||||
|
done
|
||||||
|
# clean up
|
||||||
|
rm JSON_for_Modern_C++.docset/Contents/Resources/Documents/sitemap.*
|
||||||
|
# copy index
|
||||||
|
cp docSet.dsidx JSON_for_Modern_C++.docset/Contents/Resources/
|
||||||
|
|
||||||
.PHONY: JSON_for_Modern_C++.tgz
|
|
||||||
JSON_for_Modern_C++.tgz: JSON_for_Modern_C++.docset
|
JSON_for_Modern_C++.tgz: JSON_for_Modern_C++.docset
|
||||||
$(PYTHON) generate_docset.py tgz .
|
tar --exclude='.DS_Store' -cvzf JSON_for_Modern_C++.tgz JSON_for_Modern_C++.docset
|
||||||
|
|
||||||
# install docset for Zeal documentation browser (https://zealdocs.org/)
|
# install docset for Zeal documentation browser (https://zealdocs.org/)
|
||||||
.PHONY: install_docset_zeal
|
.PHONY: install_docset_zeal
|
||||||
@@ -28,6 +52,36 @@ install_docset_zeal: JSON_for_Modern_C++.docset
|
|||||||
mkdir -p $$docset_root; \
|
mkdir -p $$docset_root; \
|
||||||
cp -r JSON_for_Modern_C++.docset $$docset_root/
|
cp -r JSON_for_Modern_C++.docset $$docset_root/
|
||||||
|
|
||||||
|
# list mkdocs pages missing from the docset index
|
||||||
|
.PHONY: list_missing_pages
|
||||||
|
list_missing_pages: docSet.dsidx
|
||||||
|
@for page in $(MKDOCS_PAGES); do \
|
||||||
|
case "$$page" in \
|
||||||
|
*/index.md) path=$${page/\/index.md/} ;; \
|
||||||
|
*) path=$${page/.md/} ;; \
|
||||||
|
esac; \
|
||||||
|
if [ "x$$page" != "xindex.md" -a "x$$(sqlite3 docSet.dsidx "SELECT COUNT(*) FROM searchIndex WHERE path='$$path/index.html'")" = "x0" ]; then \
|
||||||
|
echo $$page; \
|
||||||
|
fi \
|
||||||
|
done
|
||||||
|
|
||||||
|
# list paths in the docset index without a corresponding mkdocs page
|
||||||
|
.PHONY: list_removed_paths
|
||||||
|
list_removed_paths: docSet.dsidx
|
||||||
|
@for path in $$(sqlite3 docSet.dsidx "SELECT path FROM searchIndex"); do \
|
||||||
|
page=$${path/\/index.html/.md}; \
|
||||||
|
page_index=$${path/index.html/index.md}; \
|
||||||
|
page_found=0; \
|
||||||
|
for p in $(MKDOCS_PAGES); do \
|
||||||
|
if [ "x$$p" = "x$$page" -o "x$$p" = "x$$page_index" ]; then \
|
||||||
|
page_found=1; \
|
||||||
|
fi \
|
||||||
|
done; \
|
||||||
|
if [ "x$$page_found" = "x0" ]; then \
|
||||||
|
echo $$path; \
|
||||||
|
fi \
|
||||||
|
done
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -f docSet.dsidx
|
rm -f docSet.dsidx
|
||||||
|
|||||||
@@ -4,16 +4,13 @@ The folder contains the required files to create a [docset](https://kapeli.com/d
|
|||||||
documentation browsers like [Dash](https://kapeli.com/dash), [Velocity](https://velocity.silverlakesoftware.com), or
|
documentation browsers like [Dash](https://kapeli.com/dash), [Velocity](https://velocity.silverlakesoftware.com), or
|
||||||
[Zeal](https://zealdocs.org).
|
[Zeal](https://zealdocs.org).
|
||||||
|
|
||||||
The docset (pages and search index) is generated by `generate_docset.py` from the mkdocs site and `mkdocs.yml`. It
|
The docset can be created with
|
||||||
can be created with
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
make JSON_for_Modern_C++.docset
|
make nlohmann_json.docset
|
||||||
```
|
```
|
||||||
|
|
||||||
The generated folder `JSON_for_Modern_C++.docset` can then be opened in the documentation browser. `make all` builds a
|
The generated folder `nlohmann_json.docset` can then be opened in the documentation browser.
|
||||||
`JSON_for_Modern_C++.tgz` archive instead, and `make install_docset_zeal` installs the docset for Zeal directly.
|
|
||||||
`make docSet.dsidx` builds only the search index.
|
|
||||||
|
|
||||||
A recent version is also part of the [Dash user contributions](https://github.com/Kapeli/Dash-User-Contributions/tree/master/docsets/JSON_for_Modern_C%2B%2B).
|
A recent version is also part of the [Dash user contributions](https://github.com/Kapeli/Dash-User-Contributions/tree/master/docsets/JSON_for_Modern_C%2B%2B).
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,244 @@
|
|||||||
|
DROP TABLE IF EXISTS searchIndex;
|
||||||
|
CREATE TABLE searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT);
|
||||||
|
CREATE UNIQUE INDEX anchor ON searchIndex (name, type, path);
|
||||||
|
|
||||||
|
-- API
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('adl_serializer', 'Class', 'api/adl_serializer/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('adl_serializer::from_json', 'Function', 'api/adl_serializer/from_json/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('adl_serializer::to_json', 'Function', 'api/adl_serializer/to_json/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('byte_container_with_subtype', 'Class', 'api/byte_container_with_subtype/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('byte_container_with_subtype::byte_container_with_subtype', 'Constructor', 'api/byte_container_with_subtype/byte_container_with_subtype/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('byte_container_with_subtype::clear_subtype', 'Method', 'api/byte_container_with_subtype/clear_subtype/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('byte_container_with_subtype::has_subtype', 'Method', 'api/byte_container_with_subtype/has_subtype/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('byte_container_with_subtype::set_subtype', 'Method', 'api/byte_container_with_subtype/set_subtype/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('byte_container_with_subtype::subtype', 'Method', 'api/byte_container_with_subtype/subtype/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json', 'Class', 'api/basic_json/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::accept', 'Function', 'api/basic_json/accept/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::array', 'Function', 'api/basic_json/array/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::array_t', 'Type', 'api/basic_json/array_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::at', 'Method', 'api/basic_json/at/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::back', 'Method', 'api/basic_json/back/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::basic_json', 'Constructor', 'api/basic_json/basic_json/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::begin', 'Method', 'api/basic_json/begin/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::binary', 'Function', 'api/basic_json/binary/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::binary_t', 'Type', 'api/basic_json/binary_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::boolean_t', 'Type', 'api/basic_json/boolean_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::cbegin', 'Method', 'api/basic_json/cbegin/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::cbor_tag_handler_t', 'Enum', 'api/basic_json/cbor_tag_handler_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::cend', 'Method', 'api/basic_json/cend/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::clear', 'Method', 'api/basic_json/clear/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::contains', 'Method', 'api/basic_json/contains/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::count', 'Method', 'api/basic_json/count/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::crbegin', 'Method', 'api/basic_json/crbegin/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::crend', 'Method', 'api/basic_json/crend/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::default_object_comparator_t', 'Type', 'api/basic_json/default_object_comparator_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::diff', 'Function', 'api/basic_json/diff/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::dump', 'Method', 'api/basic_json/dump/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::emplace', 'Method', 'api/basic_json/emplace/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::emplace_back', 'Method', 'api/basic_json/emplace_back/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::empty', 'Method', 'api/basic_json/empty/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::end', 'Method', 'api/basic_json/end/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::end_pos', 'Method', 'api/basic_json/end_pos/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::erase', 'Method', 'api/basic_json/erase/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::error_handler_t', 'Enum', 'api/basic_json/error_handler_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::exception', 'Class', 'api/basic_json/exception/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::find', 'Method', 'api/basic_json/find/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::flatten', 'Method', 'api/basic_json/flatten/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::from_bjdata', 'Function', 'api/basic_json/from_bjdata/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::from_bson', 'Function', 'api/basic_json/from_bson/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::from_cbor', 'Function', 'api/basic_json/from_cbor/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::from_msgpack', 'Function', 'api/basic_json/from_msgpack/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::from_ubjson', 'Function', 'api/basic_json/from_ubjson/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::front', 'Method', 'api/basic_json/front/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::get', 'Method', 'api/basic_json/get/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::get_allocator', 'Function', 'api/basic_json/get_allocator/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::get_binary', 'Method', 'api/basic_json/get_binary/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::get_ptr', 'Method', 'api/basic_json/get_ptr/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::get_ref', 'Method', 'api/basic_json/get_ref/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::get_to', 'Method', 'api/basic_json/get_to/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::input_format_t', 'Enum', 'api/basic_json/input_format_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::insert', 'Method', 'api/basic_json/insert/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::invalid_iterator', 'Class', 'api/basic_json/invalid_iterator/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::is_array', 'Method', 'api/basic_json/is_array/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::is_binary', 'Method', 'api/basic_json/is_binary/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::is_boolean', 'Method', 'api/basic_json/is_boolean/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::is_discarded', 'Method', 'api/basic_json/is_discarded/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::is_null', 'Method', 'api/basic_json/is_null/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::is_number', 'Method', 'api/basic_json/is_number/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::is_number_float', 'Method', 'api/basic_json/is_number_float/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::is_number_integer', 'Method', 'api/basic_json/is_number_integer/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::is_number_unsigned', 'Method', 'api/basic_json/is_number_unsigned/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::is_object', 'Method', 'api/basic_json/is_object/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::is_primitive', 'Method', 'api/basic_json/is_primitive/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::is_string', 'Method', 'api/basic_json/is_string/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::is_structured', 'Method', 'api/basic_json/is_structured/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::items', 'Method', 'api/basic_json/items/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::json_base_class_t', 'Type', 'api/basic_json/json_base_class_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::json_serializer', 'Class', 'api/basic_json/json_serializer/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::max_size', 'Method', 'api/basic_json/max_size/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::merge_patch', 'Method', 'api/basic_json/merge_patch/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::meta', 'Function', 'api/basic_json/meta/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::number_float_t', 'Type', 'api/basic_json/number_float_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::number_integer_t', 'Type', 'api/basic_json/number_integer_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::number_unsigned_t', 'Type', 'api/basic_json/number_unsigned_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::object', 'Function', 'api/basic_json/object/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::object_comparator_t', 'Type', 'api/basic_json/object_comparator_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::object_t', 'Type', 'api/basic_json/object_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::operator ValueType', 'Operator', 'api/basic_json/operator_ValueType/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::operator value_t', 'Operator', 'api/basic_json/operator_value_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::operator[]', 'Operator', 'api/basic_json/operator[]/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::operator=', 'Operator', 'api/basic_json/operator=/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::operator+=', 'Operator', 'api/basic_json/operator+=/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::operator==', 'Operator', 'api/basic_json/operator_eq/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::operator!=', 'Operator', 'api/basic_json/operator_ne/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::operator<', 'Operator', 'api/basic_json/operator_lt/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::operator<=', 'Operator', 'api/basic_json/operator_le/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::operator>', 'Operator', 'api/basic_json/operator_gt/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::operator>=', 'Operator', 'api/basic_json/operator_ge/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::operator<=>', 'Operator', 'api/basic_json/operator_spaceship/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::out_of_range', 'Class', 'api/basic_json/out_of_range/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::other_error', 'Class', 'api/basic_json/other_error/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::parse', 'Function', 'api/basic_json/parse/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::parse_error', 'Class', 'api/basic_json/parse_error/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::parse_event_t', 'Enum', 'api/basic_json/parse_event_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::parser_callback_t', 'Type', 'api/basic_json/parser_callback_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::patch', 'Method', 'api/basic_json/patch/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::patch_inplace', 'Method', 'api/basic_json/patch_inplace/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::push_back', 'Method', 'api/basic_json/push_back/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::rbegin', 'Method', 'api/basic_json/rbegin/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::rend', 'Method', 'api/basic_json/rend/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::sax_parse', 'Function', 'api/basic_json/sax_parse/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::size', 'Method', 'api/basic_json/size/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::start_pos', 'Method', 'api/basic_json/start_pos/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::string_t', 'Type', 'api/basic_json/string_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::swap', 'Method', 'api/basic_json/swap/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::type', 'Method', 'api/basic_json/type/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::type_error', 'Class', 'api/basic_json/type_error/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::type_name', 'Method', 'api/basic_json/type_name/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::unflatten', 'Method', 'api/basic_json/unflatten/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::update', 'Method', 'api/basic_json/update/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::to_bjdata', 'Function', 'api/basic_json/to_bjdata/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::to_bson', 'Function', 'api/basic_json/to_bson/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::to_cbor', 'Function', 'api/basic_json/to_cbor/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::to_msgpack', 'Function', 'api/basic_json/to_msgpack/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::to_string', 'Method', 'api/basic_json/to_string/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::to_ubjson', 'Function', 'api/basic_json/to_ubjson/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::value', 'Method', 'api/basic_json/value/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::value_t', 'Enum', 'api/basic_json/value_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json::~basic_json', 'Method', 'api/basic_json/~basic_json/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json', 'Class', 'api/json/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer', 'Class', 'api/json_pointer/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer::back', 'Method', 'api/json_pointer/back/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer::empty', 'Method', 'api/json_pointer/empty/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer::json_pointer', 'Constructor', 'api/json_pointer/json_pointer/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer::operator==', 'Operator', 'api/json_pointer/operator_eq/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer::operator!=', 'Operator', 'api/json_pointer/operator_ne/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer::operator/', 'Operator', 'api/json_pointer/operator_slash/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer::operator/=', 'Operator', 'api/json_pointer/operator_slasheq/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer::operator string_t', 'Operator', 'api/json_pointer/operator_string_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer::parent_pointer', 'Method', 'api/json_pointer/parent_pointer/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer::pop_back', 'Method', 'api/json_pointer/pop_back/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer::push_back', 'Method', 'api/json_pointer/push_back/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer::string_t', 'Type', 'api/json_pointer/string_t/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer::to_string', 'Method', 'api/json_pointer/to_string/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_sax', 'Class', 'api/json_sax/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_sax::binary', 'Method', 'api/json_sax/binary/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_sax::boolean', 'Method', 'api/json_sax/boolean/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_sax::end_array', 'Method', 'api/json_sax/end_array/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_sax::end_object', 'Method', 'api/json_sax/end_object/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_sax::key', 'Method', 'api/json_sax/key/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_sax::null', 'Method', 'api/json_sax/null/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_sax::number_float', 'Method', 'api/json_sax/number_float/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_sax::number_integer', 'Method', 'api/json_sax/number_integer/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_sax::number_unsigned', 'Method', 'api/json_sax/number_unsigned/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_sax::parse_error', 'Method', 'api/json_sax/parse_error/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_sax::start_array', 'Method', 'api/json_sax/start_array/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_sax::start_object', 'Method', 'api/json_sax/start_object/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('json_sax::string', 'Method', 'api/json_sax/string/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('operator""_json', 'Literal', 'api/operator_literal_json/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('operator""_json_pointer', 'Literal', 'api/operator_literal_json_pointer/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('operator<<', 'Operator', 'api/operator_ltlt/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('operator>>', 'Operator', 'api/operator_gtgt/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('ordered_json', 'Class', 'api/ordered_json/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('ordered_map', 'Class', 'api/ordered_map/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('std::hash<basic_json>', 'Class', 'api/basic_json/std_hash/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('std::swap<basic_json>', 'Function', 'api/basic_json/std_swap/index.html');
|
||||||
|
|
||||||
|
-- Features
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Arbitrary Type Conversions', 'Guide', 'features/arbitrary_types/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Binary Formats', 'Guide', 'features/binary_formats/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Binary Formats: BJData', 'Guide', 'features/binary_formats/bjdata/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Binary Formats: BSON', 'Guide', 'features/binary_formats/bson/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Binary Formats: CBOR', 'Guide', 'features/binary_formats/cbor/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Binary Formats: MessagePack', 'Guide', 'features/binary_formats/messagepack/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Binary Formats: UBJSON', 'Guide', 'features/binary_formats/ubjson/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Binary Values', 'Guide', 'features/binary_values/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Comments', 'Guide', 'features/comments/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Element Access', 'Guide', 'features/element_access/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Element Access: Access with default value: value', 'Guide', 'features/element_access/default_value/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Element Access: Checked access: at', 'Guide', 'features/element_access/checked_access/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Element Access: Unchecked access: operator[]', 'Guide', 'features/element_access/unchecked_access/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Exceptions', 'Guide', 'home/exceptions/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Integration: Migration Guide', 'Guide', 'integration/migration_guide/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Integration: CMake', 'Guide', 'integration/cmake/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Integration: Header only', 'Guide', 'integration/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Integration: Package Managers', 'Guide', 'integration/package_managers/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Integration: Pkg-config', 'Guide', 'integration/pkg-config/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Iterators', 'Guide', 'features/iterators/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON Merge Patch', 'Guide', 'features/merge_patch/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON Patch and Diff', 'Guide', 'features/json_patch/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON Pointer', 'Guide', 'features/json_pointer/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('nlohmann Namespace', 'Guide', 'features/namespace/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Types', 'Guide', 'features/types/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Types: Number Handling', 'Guide', 'features/types/number_handling/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Object Order', 'Guide', 'features/object_order/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Parsing', 'Guide', 'features/parsing/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Parsing: JSON Lines', 'Guide', 'features/parsing/json_lines/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Parsing: Parser Callbacks', 'Guide', 'features/parsing/parser_callbacks/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Parsing: Parsing and Exceptions', 'Guide', 'features/parsing/parse_exceptions/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Parsing: SAX Interface', 'Guide', 'features/parsing/sax_interface/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Runtime Assertions', 'Guide', 'features/assertions/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Specializing enum conversion', 'Guide', 'features/enum_conversion/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Supported Macros', 'Guide', 'features/macros/index.html');
|
||||||
|
|
||||||
|
-- Macros
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_ASSERT', 'Macro', 'api/macros/json_assert/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_CATCH_USER', 'Macro', 'api/macros/json_throw_user/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_DIAGNOSTICS', 'Macro', 'api/macros/json_diagnostics/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_DIAGNOSTIC_POSITIONS', 'Macro', 'api/macros/json_diagnostic_positions/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_DISABLE_ENUM_SERIALIZATION', 'Macro', 'api/macros/json_disable_enum_serialization/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_HAS_CPP_11', 'Macro', 'api/macros/json_has_cpp_11/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_HAS_CPP_14', 'Macro', 'api/macros/json_has_cpp_11/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_HAS_CPP_17', 'Macro', 'api/macros/json_has_cpp_11/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_HAS_CPP_20', 'Macro', 'api/macros/json_has_cpp_11/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_HAS_EXPERIMENTAL_FILESYSTEM', 'Macro', 'api/macros/json_has_filesystem/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_HAS_FILESYSTEM', 'Macro', 'api/macros/json_has_filesystem/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_HAS_RANGES', 'Macro', 'api/macros/json_has_ranges/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_HAS_STATIC_RTTI', 'Macro', 'api/macros/json_has_static_rtti/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_HAS_THREE_WAY_COMPARISON', 'Macro', 'api/macros/json_has_three_way_comparison/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_NOEXCEPTION', 'Macro', 'api/macros/json_noexception/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_NO_IO', 'Macro', 'api/macros/json_no_io/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_SKIP_LIBRARY_VERSION_CHECK', 'Macro', 'api/macros/json_skip_library_version_check/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_SKIP_UNSUPPORTED_COMPILER_CHECK', 'Macro', 'api/macros/json_skip_unsupported_compiler_check/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_THROW_USER', 'Macro', 'api/macros/json_throw_user/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_TRY_USER', 'Macro', 'api/macros/json_throw_user/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_USE_GLOBAL_UDLS', 'Macro', 'api/macros/json_use_global_udls/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_USE_IMPLICIT_CONVERSIONS', 'Macro', 'api/macros/json_use_implicit_conversions/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON', 'Macro', 'api/macros/json_use_legacy_discarded_value_comparison/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('Macros', 'Macro', 'api/macros/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE', 'Macro', 'api/macros/nlohmann_define_derived_type/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_WITH_DEFAULT', 'Macro', 'api/macros/nlohmann_define_derived_type/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE', 'Macro', 'api/macros/nlohmann_define_derived_type/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_WITH_DEFAULT', 'Macro', 'api/macros/nlohmann_define_derived_type/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_DEFINE_TYPE_INTRUSIVE', 'Macro', 'api/macros/nlohmann_define_type_intrusive/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT', 'Macro', 'api/macros/nlohmann_define_type_intrusive/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE', 'Macro', 'api/macros/nlohmann_define_type_non_intrusive/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT', 'Macro', 'api/macros/nlohmann_define_type_non_intrusive/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_JSON_NAMESPACE', 'Macro', 'api/macros/nlohmann_json_namespace/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_JSON_NAMESPACE_BEGIN', 'Macro', 'api/macros/nlohmann_json_namespace_begin/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_JSON_NAMESPACE_END', 'Macro', 'api/macros/nlohmann_json_namespace_begin/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_JSON_NAMESPACE_NO_VERSION', 'Macro', 'api/macros/nlohmann_json_namespace_no_version/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_JSON_SERIALIZE_ENUM', 'Macro', 'api/macros/nlohmann_json_serialize_enum/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_JSON_VERSION_MAJOR', 'Macro', 'api/macros/nlohmann_json_version_major/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_JSON_VERSION_MINOR', 'Macro', 'api/macros/nlohmann_json_version_major/index.html');
|
||||||
|
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_JSON_VERSION_PATCH', 'Macro', 'api/macros/nlohmann_json_version_major/index.html');
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
"archive": "JSON_for_Modern_C++.tgz",
|
"archive": "JSON_for_Modern_C++.tgz",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Niels Lohmann",
|
"name": "Niels Lohmann",
|
||||||
"link": "https://nlohmann.me"
|
"link": "https://twitter.com/nlohmann"
|
||||||
},
|
},
|
||||||
"aliases": ["nlohmann/json"]
|
"aliases": ["nlohmann/json"]
|
||||||
}
|
}
|
||||||
@@ -1,533 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
"""Generate the Dash docset search index from the mkdocs sources."""
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import glob
|
|
||||||
import hashlib
|
|
||||||
import html
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import shutil
|
|
||||||
import sqlite3
|
|
||||||
import sys
|
|
||||||
import tarfile
|
|
||||||
import urllib.parse
|
|
||||||
import urllib.request
|
|
||||||
|
|
||||||
import yaml
|
|
||||||
|
|
||||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
||||||
MKDOCS_YML = os.path.join(HERE, '..', 'mkdocs', 'mkdocs.yml')
|
|
||||||
PAGES = os.path.join(HERE, '..', 'mkdocs', 'docs')
|
|
||||||
|
|
||||||
# api pages whose (name, type) cannot be derived by the heuristics
|
|
||||||
OVERRIDES = {
|
|
||||||
}
|
|
||||||
|
|
||||||
DOCSET = 'JSON_for_Modern_C++.docset'
|
|
||||||
TITLE_SUFFIX = ' - JSON for Modern C++</title>'
|
|
||||||
|
|
||||||
# CSS rules appended to the stylesheet: hide navigation items and fix spacing
|
|
||||||
# hide the navigation (the documentation browser has its own); Material's class selectors would win over element
|
|
||||||
# selectors, hence the classes and !important
|
|
||||||
CSS_PATCH = (
|
|
||||||
'\n\n.md-header, .md-footer, .md-tabs, .md-sidebar--primary, .md-content__button { display: none !important; }'
|
|
||||||
'\n\n.md-sidebar--secondary, .md-main__inner { top: 0 !important; margin-top: 0 !important; }'
|
|
||||||
)
|
|
||||||
|
|
||||||
USER_AGENT = ('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 '
|
|
||||||
'(KHTML, like Gecko) Chrome/124.0 Safari/537.36')
|
|
||||||
CONTENT_TYPE_EXT = {'image/svg+xml': '.svg', 'image/png': '.png', 'image/jpeg': '.jpg',
|
|
||||||
'image/gif': '.gif', 'image/webp': '.webp'}
|
|
||||||
|
|
||||||
# remote loads that are allowed to remain (URL -> reason)
|
|
||||||
ALLOWED_REMOTE = {
|
|
||||||
# Material only loads this polyfill if the browser has no ResizeObserver
|
|
||||||
'https://unpkg.com/resize-observer-polyfill': 'fallback for browsers without ResizeObserver',
|
|
||||||
}
|
|
||||||
|
|
||||||
problems = []
|
|
||||||
|
|
||||||
|
|
||||||
def problem(page, reason) -> None:
|
|
||||||
"""Record a problem; all problems are reported at the end."""
|
|
||||||
problems.append(f'generate_docset.py: {page}: {reason}')
|
|
||||||
|
|
||||||
|
|
||||||
class Loader(yaml.SafeLoader):
|
|
||||||
"""YAML loader that tolerates the custom tags used in mkdocs.yml."""
|
|
||||||
|
|
||||||
|
|
||||||
Loader.add_multi_constructor('', lambda loader, suffix, node: None)
|
|
||||||
|
|
||||||
|
|
||||||
def walk_nav(items, groups=()):
|
|
||||||
"""Yield (group titles, nav title or None, md path) for all nav leaves."""
|
|
||||||
for item in items:
|
|
||||||
if isinstance(item, str):
|
|
||||||
yield list(groups), None, item
|
|
||||||
elif isinstance(item, dict):
|
|
||||||
for title, value in item.items():
|
|
||||||
if isinstance(value, list):
|
|
||||||
yield from walk_nav(value, groups + (str(title),))
|
|
||||||
else:
|
|
||||||
yield list(groups), str(title), value
|
|
||||||
|
|
||||||
|
|
||||||
def page_path(md_path) -> str:
|
|
||||||
"""Map a markdown path to the HTML path of the rendered page."""
|
|
||||||
if md_path.endswith('/index.md'):
|
|
||||||
return md_path[:-len('index.md')] + 'index.html'
|
|
||||||
return md_path[:-len('.md')] + '/index.html'
|
|
||||||
|
|
||||||
|
|
||||||
def read_page(md_path) -> str:
|
|
||||||
"""Read a page (resolving a snippet include), return '' if it does not exist."""
|
|
||||||
try:
|
|
||||||
with open(os.path.join(PAGES, md_path), encoding='utf-8') as f:
|
|
||||||
text = f.read()
|
|
||||||
m = re.match(r'--8<-- "(.+)"\s*$', text)
|
|
||||||
if m:
|
|
||||||
with open(os.path.join(PAGES, m.group(1)), encoding='utf-8') as f:
|
|
||||||
text = f.read()
|
|
||||||
return text
|
|
||||||
except OSError:
|
|
||||||
return ''
|
|
||||||
|
|
||||||
|
|
||||||
def clean(text) -> str:
|
|
||||||
"""Strip tags and entities from a heading and normalize whitespace."""
|
|
||||||
text = text.replace('\\>', '\x00') # escaped '>' is not the end of a tag
|
|
||||||
text = html.unescape(re.sub(r'</?[a-zA-Z][^>]*>', '', text)).replace('\x00', '>')
|
|
||||||
return re.sub(r'\s+', ' ', text).strip()
|
|
||||||
|
|
||||||
|
|
||||||
def strip_fences(text) -> str:
|
|
||||||
"""Remove fenced code blocks (their lines may start with '# ')."""
|
|
||||||
return re.sub(r'^(```|~~~).*?^\1[^\n]*$', '', text, flags=re.M | re.S)
|
|
||||||
|
|
||||||
|
|
||||||
def get_h1(text):
|
|
||||||
"""Return the cleaned first H1 of a page or None."""
|
|
||||||
body = strip_fences(text)
|
|
||||||
m = re.search(r'^# (.+)$', body, flags=re.M)
|
|
||||||
if m:
|
|
||||||
return clean(m.group(1))
|
|
||||||
m = re.search(r'<h1>(.*?)</h1>', body, flags=re.S)
|
|
||||||
return clean(m.group(1)) if m else None
|
|
||||||
|
|
||||||
|
|
||||||
def split_top_level(text, seps=','):
|
|
||||||
"""Split at separators that are not nested in <>, () or []."""
|
|
||||||
parts, depth, current = [], 0, ''
|
|
||||||
for c in text:
|
|
||||||
if c in '<([':
|
|
||||||
depth += 1
|
|
||||||
elif c in '>)]':
|
|
||||||
depth -= 1
|
|
||||||
if c in seps and depth <= 0:
|
|
||||||
parts.append(current)
|
|
||||||
current = ''
|
|
||||||
else:
|
|
||||||
current += c
|
|
||||||
parts.append(current)
|
|
||||||
return [p.strip() for p in parts if p.strip()]
|
|
||||||
|
|
||||||
|
|
||||||
OPERATOR_SYMBOLS = ('<=>', '<<', '>>', '<=', '>=', '<', '>')
|
|
||||||
|
|
||||||
|
|
||||||
def api_names(h1) -> list:
|
|
||||||
"""Derive the entry names from the H1 of an api page."""
|
|
||||||
# hide the angle brackets of operators from the nesting detection
|
|
||||||
for i, sym in enumerate(OPERATOR_SYMBOLS):
|
|
||||||
h1 = h1.replace('operator' + sym, f'operator\x01{i}\x01')
|
|
||||||
names = []
|
|
||||||
for part in split_top_level(h1):
|
|
||||||
name = part.replace('\\', '').replace('nlohmann::', '')
|
|
||||||
name = re.sub(r'\x01(\d)\x01', lambda m: OPERATOR_SYMBOLS[int(m.group(1))], name)
|
|
||||||
# drop qualifiers like "operator<<(basic_json)", but keep "operator()"
|
|
||||||
if not name.endswith('operator()'):
|
|
||||||
name = re.sub(r'(?<=\w|[<>=!+\-*/\[\]])\([^()]*\)$', '', name)
|
|
||||||
if name not in names:
|
|
||||||
names.append(name)
|
|
||||||
return names
|
|
||||||
|
|
||||||
|
|
||||||
def first_cpp_block(text):
|
|
||||||
"""Return the first ```cpp block following the H1."""
|
|
||||||
m = re.search(r'^# .*?^```cpp\n(.*?)^```', text, flags=re.M | re.S)
|
|
||||||
return m.group(1) if m else None
|
|
||||||
|
|
||||||
|
|
||||||
def api_type(name, decl):
|
|
||||||
"""Determine the Dash entry type from name and declaration."""
|
|
||||||
parts = name.split('::')
|
|
||||||
last = parts[-1]
|
|
||||||
if name.startswith('operator""'):
|
|
||||||
return 'Literal'
|
|
||||||
if last.startswith('operator'):
|
|
||||||
return 'Operator'
|
|
||||||
if decl is None:
|
|
||||||
return None
|
|
||||||
if re.search(r'\benum\b', decl):
|
|
||||||
return 'Enum'
|
|
||||||
if re.search(r'^\s*(template\s*<.*>\s*)?(class|struct)\s+\w+\s*(final\b|[:{;<]|$)', decl, flags=re.M):
|
|
||||||
return 'Class'
|
|
||||||
if re.search(r'\busing\s+\w+\s*=', decl) or 'typedef' in decl:
|
|
||||||
return 'Type'
|
|
||||||
if len(parts) > 1 and last == parts[-2]:
|
|
||||||
return 'Constructor'
|
|
||||||
if last.startswith('~'):
|
|
||||||
return 'Method'
|
|
||||||
if re.search(r'\bstatic\b', decl) or len(parts) == 1 or parts[0] == 'std':
|
|
||||||
return 'Function'
|
|
||||||
return 'Method'
|
|
||||||
|
|
||||||
|
|
||||||
def macro_names(h1) -> list:
|
|
||||||
"""Split the H1 of a macro page into macro names."""
|
|
||||||
return [n.strip() for n in re.split(r'[,/]', h1) if n.strip()]
|
|
||||||
|
|
||||||
|
|
||||||
def api_entries(md_path):
|
|
||||||
"""Return the (name, type) pairs of an api page."""
|
|
||||||
if md_path in OVERRIDES:
|
|
||||||
return OVERRIDES[md_path]
|
|
||||||
if md_path == 'api/macros/index.md':
|
|
||||||
return [('Macros', 'Macro')]
|
|
||||||
text = read_page(md_path)
|
|
||||||
h1 = get_h1(text)
|
|
||||||
if not h1:
|
|
||||||
problem(md_path, 'no H1 found')
|
|
||||||
return []
|
|
||||||
if md_path.startswith('api/macros/'):
|
|
||||||
return [(n, 'Macro') for n in macro_names(h1)]
|
|
||||||
names = api_names(h1)
|
|
||||||
if not names:
|
|
||||||
problem(md_path, 'no names found')
|
|
||||||
return []
|
|
||||||
decl = first_cpp_block(text)
|
|
||||||
result = []
|
|
||||||
for name in names:
|
|
||||||
kind = api_type(name, decl)
|
|
||||||
if kind is None:
|
|
||||||
problem(md_path, f'no type determinable for {name}')
|
|
||||||
else:
|
|
||||||
result.append((name, kind))
|
|
||||||
return result
|
|
||||||
|
|
||||||
|
|
||||||
def guide_entries(nav):
|
|
||||||
"""Yield (name, type, md path) for all non-api nav pages."""
|
|
||||||
for groups, title, md_path in walk_nav(nav):
|
|
||||||
if md_path.startswith('api/') or md_path == 'index.md':
|
|
||||||
continue
|
|
||||||
if not md_path.endswith('.md'):
|
|
||||||
continue
|
|
||||||
groups = groups[1:] # drop the top-level tab
|
|
||||||
if title is None:
|
|
||||||
title = get_h1(read_page(md_path))
|
|
||||||
if not title:
|
|
||||||
problem(md_path, 'no title found')
|
|
||||||
continue
|
|
||||||
# "Parsing: Parsing Untrusted Input" -> "Parsing: Untrusted Input"
|
|
||||||
if groups and title.startswith(groups[-1] + ' ') and title[len(groups[-1]) + 1:][:1].isupper():
|
|
||||||
title = title[len(groups[-1]) + 1:]
|
|
||||||
if md_path.endswith('/index.md') and groups and title == groups[-1]:
|
|
||||||
name = ': '.join(groups)
|
|
||||||
else:
|
|
||||||
name = ': '.join(groups + [title])
|
|
||||||
yield name, 'Guide', md_path
|
|
||||||
|
|
||||||
|
|
||||||
def build_entries() -> list:
|
|
||||||
"""Return the sorted list of (name, type, path) index entries."""
|
|
||||||
nav = load_mkdocs_yml()['nav']
|
|
||||||
|
|
||||||
entries = set()
|
|
||||||
for name, kind, md_path in guide_entries(nav):
|
|
||||||
entries.add((name, kind, page_path(md_path)))
|
|
||||||
|
|
||||||
api_root = os.path.join(PAGES, 'api')
|
|
||||||
on_disk = set()
|
|
||||||
for root, _, files in os.walk(api_root):
|
|
||||||
for file in files:
|
|
||||||
if file.endswith('.md'):
|
|
||||||
rel = os.path.relpath(os.path.join(root, file), PAGES)
|
|
||||||
on_disk.add(rel.replace(os.sep, '/'))
|
|
||||||
for _, _, md_path in walk_nav(nav):
|
|
||||||
if md_path.startswith('api/') and md_path not in on_disk:
|
|
||||||
problem(md_path, 'listed in nav but missing on disk')
|
|
||||||
for md_path in sorted(on_disk):
|
|
||||||
for name, kind in api_entries(md_path):
|
|
||||||
entries.add((name, kind, page_path(md_path)))
|
|
||||||
return sorted(entries)
|
|
||||||
|
|
||||||
|
|
||||||
def write_index(entries, out) -> None:
|
|
||||||
"""Write the entries into a SQLite search index."""
|
|
||||||
if os.path.exists(out):
|
|
||||||
os.remove(out)
|
|
||||||
con = sqlite3.connect(out)
|
|
||||||
con.execute('CREATE TABLE searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT)')
|
|
||||||
con.execute('CREATE UNIQUE INDEX anchor ON searchIndex (name, type, path)')
|
|
||||||
con.executemany('INSERT INTO searchIndex(name, type, path) VALUES (?, ?, ?)', entries)
|
|
||||||
con.commit()
|
|
||||||
con.close()
|
|
||||||
|
|
||||||
|
|
||||||
def html_files(root):
|
|
||||||
"""Yield all HTML files below root."""
|
|
||||||
for base, _, files in os.walk(root):
|
|
||||||
for file in files:
|
|
||||||
if file.endswith('.html'):
|
|
||||||
yield os.path.join(base, file)
|
|
||||||
|
|
||||||
|
|
||||||
def read(path) -> str:
|
|
||||||
with open(path, encoding='utf-8') as f:
|
|
||||||
return f.read()
|
|
||||||
|
|
||||||
|
|
||||||
def write(path, text) -> None:
|
|
||||||
with open(path, 'w', encoding='utf-8') as f:
|
|
||||||
f.write(text)
|
|
||||||
|
|
||||||
|
|
||||||
def remove_source_widget(docs) -> None:
|
|
||||||
"""Drop data-md-component=source so Material does not query api.github.com for the stars and version."""
|
|
||||||
pattern = re.compile(r'\sdata-md-component=(?:"source"|source\b)')
|
|
||||||
for path in html_files(docs):
|
|
||||||
text = read(path)
|
|
||||||
new = pattern.sub('', text)
|
|
||||||
if new != text:
|
|
||||||
write(path, new)
|
|
||||||
|
|
||||||
|
|
||||||
def patch_titles(docs, entries) -> None:
|
|
||||||
"""Strip the site name from all titles; use the index names where available."""
|
|
||||||
names = {}
|
|
||||||
for name, _, path in entries:
|
|
||||||
names.setdefault(path, []).append(name)
|
|
||||||
for file in html_files(docs):
|
|
||||||
rel = os.path.relpath(file, docs).replace(os.sep, '/')
|
|
||||||
text = read(file).replace(TITLE_SUFFIX, '</title>')
|
|
||||||
if rel in names:
|
|
||||||
title = html.escape(', '.join(names[rel]), quote=False)
|
|
||||||
text = re.sub(r'<title>.*?</title>', lambda _: f'<title>{title}</title>', text, count=1, flags=re.S)
|
|
||||||
write(file, text)
|
|
||||||
|
|
||||||
|
|
||||||
IMG_RE = re.compile(r'<img\b[^>]*>', re.I)
|
|
||||||
ATTR_RE = r'''(?:{0})\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+))'''
|
|
||||||
|
|
||||||
|
|
||||||
def attr(tag, name):
|
|
||||||
"""Return the value of an attribute in a tag or None."""
|
|
||||||
m = re.search(r'(?<![\w-])' + ATTR_RE.format(name), tag, flags=re.I)
|
|
||||||
return next(g for g in m.groups() if g is not None) if m else None
|
|
||||||
|
|
||||||
|
|
||||||
def is_remote(url) -> bool:
|
|
||||||
return re.match(r'(https?:)?//', url.strip(), flags=re.I) is not None
|
|
||||||
|
|
||||||
|
|
||||||
def download(url, docs) -> str:
|
|
||||||
"""Download url into assets/external and return the path relative to docs."""
|
|
||||||
u = urllib.parse.urlparse(url if not url.startswith('//') else 'https:' + url)
|
|
||||||
if u.scheme.lower() not in ('http', 'https'):
|
|
||||||
raise ValueError(f'not an http(s) URL: {url}')
|
|
||||||
req = urllib.request.Request(u.geturl(), headers={'User-Agent': USER_AGENT})
|
|
||||||
# (the scheme is checked above)
|
|
||||||
# nosemgrep: python.lang.security.audit.dynamic-urllib-use-detected.dynamic-urllib-use-detected
|
|
||||||
with urllib.request.urlopen(req, timeout=20) as r: # nosec B310
|
|
||||||
data = r.read()
|
|
||||||
ctype = r.headers.get_content_type()
|
|
||||||
path = urllib.parse.unquote(u.path).lstrip('/')
|
|
||||||
ext = os.path.splitext(path)[1]
|
|
||||||
if u.query or not ext or path.endswith('/'):
|
|
||||||
digest = hashlib.sha256(url.encode()).hexdigest()[:12]
|
|
||||||
path = os.path.join(os.path.dirname(path), digest + CONTENT_TYPE_EXT.get(ctype, ext or '.bin'))
|
|
||||||
rel = os.path.normpath(os.path.join('assets', 'external', u.hostname, path))
|
|
||||||
out = os.path.join(docs, rel)
|
|
||||||
os.makedirs(os.path.dirname(out), exist_ok=True)
|
|
||||||
with open(out, 'wb') as f:
|
|
||||||
f.write(data)
|
|
||||||
return rel.replace(os.sep, '/')
|
|
||||||
|
|
||||||
|
|
||||||
def localize_images(docs) -> None:
|
|
||||||
"""Download remote images and rewrite their src; drop them on failure."""
|
|
||||||
cache = {}
|
|
||||||
for file in html_files(docs):
|
|
||||||
text = read(file)
|
|
||||||
|
|
||||||
def repl(m):
|
|
||||||
tag = m.group(0)
|
|
||||||
src = attr(tag, 'src')
|
|
||||||
if src is None or not is_remote(src):
|
|
||||||
return tag
|
|
||||||
if src not in cache:
|
|
||||||
try:
|
|
||||||
cache[src] = download(src, docs)
|
|
||||||
except Exception as e: # noqa: BLE001
|
|
||||||
print(f'generate_docset.py: warning: cannot download {src}: {e}', file=sys.stderr)
|
|
||||||
cache[src] = None
|
|
||||||
if cache[src] is None:
|
|
||||||
return attr(tag, 'alt') or ''
|
|
||||||
local = os.path.relpath(os.path.join(docs, cache[src]), os.path.dirname(file))
|
|
||||||
local = local.replace(os.sep, '/')
|
|
||||||
return re.sub(ATTR_RE.format('src'), lambda _: f'src="{local}"', tag, count=1, flags=re.I)
|
|
||||||
|
|
||||||
new = IMG_RE.sub(repl, text)
|
|
||||||
if new != text:
|
|
||||||
write(file, new)
|
|
||||||
|
|
||||||
|
|
||||||
def load_mkdocs_yml() -> dict:
|
|
||||||
"""Load mkdocs.yml, ignoring tags like !ENV and !!python/name."""
|
|
||||||
with open(MKDOCS_YML, encoding='utf-8') as f:
|
|
||||||
# (Loader is a yaml.SafeLoader)
|
|
||||||
return yaml.load(f, Loader=Loader) # nosec B506
|
|
||||||
|
|
||||||
|
|
||||||
def localize_site_urls(docs, site_url) -> None:
|
|
||||||
"""Load assets that the theme's JavaScript references by absolute site URL from the docset.
|
|
||||||
|
|
||||||
The privacy plugin rewrites the mermaid loader to "<site_url>assets/external/unpkg.com/mermaid@11/...", so the
|
|
||||||
docset would fetch mermaid from the live site. __md_scope is the site root that Material defines in every page.
|
|
||||||
"""
|
|
||||||
pattern = re.compile(r'"' + re.escape(site_url) + r'(assets/[^"]*)"')
|
|
||||||
for base, _, files in os.walk(docs):
|
|
||||||
for file in (f for f in files if f.endswith('.js')):
|
|
||||||
path = os.path.join(base, file)
|
|
||||||
text = read(path)
|
|
||||||
new = pattern.sub(r'new URL("\1",__md_scope).href', text)
|
|
||||||
if new != text:
|
|
||||||
write(path, new)
|
|
||||||
|
|
||||||
|
|
||||||
def remote_loads(docs, site_url) -> list:
|
|
||||||
"""Return 'file: url' strings for resources that would be loaded remotely."""
|
|
||||||
found = []
|
|
||||||
cdn = re.compile(r'https://(?:unpkg\.com|cdn\.jsdelivr\.net|cdnjs\.cloudflare\.com|'
|
|
||||||
r'fonts\.googleapis\.com|fonts\.gstatic\.com)/[^\s"\'`)\\]*')
|
|
||||||
css_url = re.compile(r'url\(\s*["\']?((?:https?:)?//[^)"\']+)', re.I)
|
|
||||||
css_import = re.compile(r'@import\s+(?:url\(\s*)?["\']?((?:https?:)?//[^)"\'; ]+)', re.I)
|
|
||||||
for base, _, files in os.walk(docs):
|
|
||||||
for file in files:
|
|
||||||
path = os.path.join(base, file)
|
|
||||||
rel = os.path.relpath(path, docs)
|
|
||||||
urls = []
|
|
||||||
if file.endswith('.html'):
|
|
||||||
text = read(path)
|
|
||||||
for m in re.finditer(r'<[a-zA-Z][^>]*>', text):
|
|
||||||
tag = m.group(0)
|
|
||||||
for name in ('src', 'poster'):
|
|
||||||
v = attr(tag, name)
|
|
||||||
if v and is_remote(v):
|
|
||||||
urls.append(v)
|
|
||||||
v = attr(tag, 'srcset')
|
|
||||||
if v:
|
|
||||||
urls += [c.split()[0] for c in v.split(',') if c.strip() and is_remote(c.strip())]
|
|
||||||
if re.match(r'<link\b', tag, flags=re.I):
|
|
||||||
rel_attr = (attr(tag, 'rel') or '').lower()
|
|
||||||
v = attr(tag, 'href')
|
|
||||||
if v and is_remote(v) and re.search(r'stylesheet|icon|preload|modulepreload|manifest', rel_attr):
|
|
||||||
urls.append(v)
|
|
||||||
urls += css_url.findall(text) + css_import.findall(text)
|
|
||||||
elif file.endswith('.css'):
|
|
||||||
text = read(path)
|
|
||||||
urls += css_url.findall(text) + css_import.findall(text)
|
|
||||||
elif file.endswith('.js'):
|
|
||||||
text = read(path)
|
|
||||||
urls += cdn.findall(text)
|
|
||||||
urls += re.findall(re.escape(site_url) + r'assets/[^\s"\'`)\\]*', text)
|
|
||||||
found += [f'{rel}: {u}' for u in urls if u not in ALLOWED_REMOTE]
|
|
||||||
return found
|
|
||||||
|
|
||||||
|
|
||||||
def make_docset(site, out_dir) -> int:
|
|
||||||
entries = build_entries()
|
|
||||||
if problems:
|
|
||||||
print('\n'.join(problems), file=sys.stderr)
|
|
||||||
return 1
|
|
||||||
docset = os.path.join(out_dir, DOCSET)
|
|
||||||
docs = os.path.join(docset, 'Contents', 'Resources', 'Documents')
|
|
||||||
if os.path.exists(docset):
|
|
||||||
shutil.rmtree(docset)
|
|
||||||
shutil.copytree(site, docs)
|
|
||||||
for icon in ('icon.png', 'icon@2x.png'):
|
|
||||||
shutil.copy(os.path.join(HERE, icon), docset)
|
|
||||||
shutil.copy(os.path.join(HERE, 'Info.plist'), os.path.join(docset, 'Contents'))
|
|
||||||
write_index(entries, os.path.join(docset, 'Contents', 'Resources', 'docSet.dsidx'))
|
|
||||||
|
|
||||||
# patch CSS to hide navigation items and fix spacing
|
|
||||||
css = glob.glob(os.path.join(docs, 'assets', 'stylesheets', 'main.*.min.css'))
|
|
||||||
if len(css) != 1:
|
|
||||||
print(f'generate_docset.py: expected exactly one main.*.min.css, found {len(css)}', file=sys.stderr)
|
|
||||||
return 1
|
|
||||||
with open(css[0], 'a', encoding='utf-8') as f:
|
|
||||||
f.write(CSS_PATCH)
|
|
||||||
|
|
||||||
patch_titles(docs, entries)
|
|
||||||
remove_source_widget(docs)
|
|
||||||
for sitemap in glob.glob(os.path.join(docs, 'sitemap.*')):
|
|
||||||
os.remove(sitemap)
|
|
||||||
|
|
||||||
# make the docset self-contained
|
|
||||||
site_url = load_mkdocs_yml()['site_url']
|
|
||||||
localize_images(docs)
|
|
||||||
localize_site_urls(docs, site_url)
|
|
||||||
remote = remote_loads(docs, site_url)
|
|
||||||
if remote:
|
|
||||||
print('generate_docset.py: remote resources remain in the docset:', file=sys.stderr)
|
|
||||||
print('\n'.join(' ' + r for r in remote), file=sys.stderr)
|
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
def make_tgz(out_dir) -> int:
|
|
||||||
docset = os.path.join(out_dir, DOCSET)
|
|
||||||
if not os.path.isdir(docset):
|
|
||||||
print(f'generate_docset.py: {docset} does not exist', file=sys.stderr)
|
|
||||||
return 1
|
|
||||||
with tarfile.open(os.path.join(out_dir, 'JSON_for_Modern_C++.tgz'), 'w:gz') as tar:
|
|
||||||
tar.add(docset, arcname=DOCSET, filter=lambda i: None if os.path.basename(i.name) == '.DS_Store' else i)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
def main() -> int:
|
|
||||||
parser = argparse.ArgumentParser(description=__doc__)
|
|
||||||
sub = parser.add_subparsers(dest='command', required=True)
|
|
||||||
sub.add_parser('list', help='print the index entries as TSV')
|
|
||||||
p = sub.add_parser('index', help='write the SQLite search index')
|
|
||||||
p.add_argument('out')
|
|
||||||
p = sub.add_parser('docset', help='build the docset from a built mkdocs site')
|
|
||||||
p.add_argument('site_dir')
|
|
||||||
p.add_argument('out_dir')
|
|
||||||
p = sub.add_parser('tgz', help='pack the docset into a tarball')
|
|
||||||
p.add_argument('out_dir')
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
if args.command == 'docset':
|
|
||||||
return make_docset(args.site_dir, args.out_dir)
|
|
||||||
if args.command == 'tgz':
|
|
||||||
return make_tgz(args.out_dir)
|
|
||||||
|
|
||||||
entries = build_entries()
|
|
||||||
if problems:
|
|
||||||
print('\n'.join(problems), file=sys.stderr)
|
|
||||||
return 1
|
|
||||||
if args.command == 'list':
|
|
||||||
for entry in entries:
|
|
||||||
print('\t'.join(entry))
|
|
||||||
elif args.command == 'index':
|
|
||||||
write_index(entries, args.out)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.exit(main())
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
+1
-13
@@ -1,8 +1,3 @@
|
|||||||
# The MkDocs 2.0 banners of Material for MkDocs and ProperDocs (via mkdocs-redirects) are printed to stderr, not
|
|
||||||
# logged, so they do not affect --strict; silence them anyway.
|
|
||||||
export NO_MKDOCS_2_WARNING := true
|
|
||||||
export DISABLE_MKDOCS_2_WARNING := true
|
|
||||||
|
|
||||||
# serve the site locally
|
# serve the site locally
|
||||||
serve: style_check
|
serve: style_check
|
||||||
venv/bin/mkdocs serve
|
venv/bin/mkdocs serve
|
||||||
@@ -13,17 +8,10 @@ serve_dirty: style_check
|
|||||||
# This target is used in the CI (ci_test_build_documentation).
|
# This target is used in the CI (ci_test_build_documentation).
|
||||||
# This target is used by the docset Makefile.
|
# This target is used by the docset Makefile.
|
||||||
build: style_check
|
build: style_check
|
||||||
venv/bin/mkdocs build --strict
|
venv/bin/mkdocs build
|
||||||
|
|
||||||
style_check:
|
style_check:
|
||||||
@cd docs ; ../venv/bin/python3 ../scripts/check_structure.py
|
@cd docs ; ../venv/bin/python3 ../scripts/check_structure.py
|
||||||
@venv/bin/python3 ../docset/generate_docset.py list > /dev/null
|
|
||||||
|
|
||||||
# check that all Mermaid diagrams parse (needs Node.js)
|
|
||||||
# This target is used in the CI (ci_test_documentation_mermaid).
|
|
||||||
check_mermaid:
|
|
||||||
npm ci --prefix scripts/mermaid --ignore-scripts --no-audit --no-fund
|
|
||||||
node scripts/mermaid/check_mermaid.mjs docs
|
|
||||||
|
|
||||||
# check the links in the documentation files in docs/mkdocs
|
# check the links in the documentation files in docs/mkdocs
|
||||||
link_check:
|
link_check:
|
||||||
|
|||||||
@@ -30,15 +30,14 @@ class (either explicitly or via the conversion operators).
|
|||||||
|
|
||||||
## Return value
|
## Return value
|
||||||
|
|
||||||
1. (none) — the converted value is written to the output parameter `val`.
|
Copy of the JSON value, converted to `ValueType`
|
||||||
2. the JSON value `j` converted to `TargetType`
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
??? example "Example: (1) Default-constructible type"
|
??? example "Example: (1) Default-constructible type"
|
||||||
|
|
||||||
The example below shows how a `from_json` function can be implemented for a user-defined type. This function is
|
The example below shows how a `from_json` function can be implemented for a user-defined type. This function is
|
||||||
called by the `adl_serializer` when `get<ns::person>()` is called.
|
called by the `adl_serializer` when `template get<ns::person>()` is called.
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
--8<-- "examples/from_json__default_constructible.cpp"
|
--8<-- "examples/from_json__default_constructible.cpp"
|
||||||
@@ -67,9 +66,7 @@ class (either explicitly or via the conversion operators).
|
|||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [`to_json`](to_json.md) - convert a C++ value to JSON
|
- [to_json](to_json.md)
|
||||||
- [Arbitrary Type Conversions](../../features/arbitrary_types.md) - write your own `from_json` and `to_json` functions
|
|
||||||
- [Converting values](../../features/conversions.md) - overview of `get`, `get_to` and implicit conversions
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ struct adl_serializer;
|
|||||||
Serializer that uses ADL ([Argument-Dependent Lookup](https://en.cppreference.com/w/cpp/language/adl)) to choose
|
Serializer that uses ADL ([Argument-Dependent Lookup](https://en.cppreference.com/w/cpp/language/adl)) to choose
|
||||||
`to_json`/`from_json` functions from the types' namespaces.
|
`to_json`/`from_json` functions from the types' namespaces.
|
||||||
|
|
||||||
It is implemented similarly to
|
It is implemented similar to
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
template<typename ValueType>
|
template<typename ValueType>
|
||||||
@@ -30,14 +30,6 @@ struct adl_serializer {
|
|||||||
- [**from_json**](from_json.md) - convert a JSON value to any value type
|
- [**from_json**](from_json.md) - convert a JSON value to any value type
|
||||||
- [**to_json**](to_json.md) - convert any value type to a JSON value
|
- [**to_json**](to_json.md) - convert any value type to a JSON value
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [Arbitrary type conversions](../../features/arbitrary_types.md) - how to make your types convertible
|
|
||||||
- [`get`](../basic_json/get.md) - / [`get_to`](../basic_json/get_to.md) - convert a JSON value to a C++ type
|
|
||||||
- [`basic_json`](../basic_json/basic_json.md) - construct a JSON value from a C++ value
|
|
||||||
- [`NLOHMANN_DEFINE_TYPE_INTRUSIVE`](../macros/nlohmann_define_type_intrusive.md) - generate the conversion functions for a type
|
|
||||||
- [Specializing enum conversion](../../features/enum_conversion.md) - serializing enums as JSON strings
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 2.1.0.
|
- Added in version 2.1.0.
|
||||||
@@ -36,9 +36,7 @@ This function is usually called by the constructors of the [basic_json](../basic
|
|||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [`from_json`](from_json.md) - convert JSON to a C++ value
|
- [from_json](from_json.md)
|
||||||
- [Arbitrary Type Conversions](../../features/arbitrary_types.md) - write your own `from_json` and `to_json` functions
|
|
||||||
- [Converting values](../../features/conversions.md) - overview of `get`, `get_to` and implicit conversions
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
|
|||||||
@@ -4,28 +4,22 @@
|
|||||||
// (1)
|
// (1)
|
||||||
template<typename InputType>
|
template<typename InputType>
|
||||||
static bool accept(InputType&& i,
|
static bool accept(InputType&& i,
|
||||||
const bool ignore_comments = false,
|
const bool ignore_comments = false);
|
||||||
const bool ignore_trailing_commas = false);
|
|
||||||
|
|
||||||
// (2)
|
// (2)
|
||||||
template<typename IteratorType, typename SentinelType = IteratorType>
|
template<typename IteratorType>
|
||||||
static bool accept(IteratorType first, SentinelType last,
|
static bool accept(IteratorType first, IteratorType last,
|
||||||
const bool ignore_comments = false,
|
const bool ignore_comments = false);
|
||||||
const bool ignore_trailing_commas = false);
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Checks whether the input is valid JSON.
|
Checks whether the input is valid JSON.
|
||||||
|
|
||||||
1. Reads from a compatible input.
|
1. Reads from a compatible input.
|
||||||
2. Reads from a pair of character iterators, or an iterator and a sentinel of a different type (C++20 ranges support)
|
2. Reads from a pair of character iterators
|
||||||
|
|
||||||
The value_type of the iterator must be an integral type with a size of 1, 2, or 4 bytes, which will be interpreted
|
The value_type of the iterator must be an integral type with a size of 1, 2, or 4 bytes, which will be interpreted
|
||||||
respectively as UTF-8, UTF-16, and UTF-32. If `SentinelType` differs from `IteratorType`, it must be comparable to
|
respectively as UTF-8, UTF-16, and UTF-32.
|
||||||
the iterator type with `operator!=`.
|
|
||||||
|
|
||||||
Ill-formed UTF-16 and UTF-32 sequences are rejected: a lone surrogate, a high surrogate that is not followed by its
|
|
||||||
low surrogate, and a code point above `U+10FFFF` all make this function return `false`.
|
|
||||||
|
|
||||||
Unlike the [`parse()`](parse.md) function, this function neither throws an exception in case of invalid JSON input
|
Unlike the [`parse()`](parse.md) function, this function neither throws an exception in case of invalid JSON input
|
||||||
(i.e., a parse error) nor creates diagnostic information.
|
(i.e., a parse error) nor creates diagnostic information.
|
||||||
|
|
||||||
@@ -38,12 +32,8 @@ Unlike the [`parse()`](parse.md) function, this function neither throws an excep
|
|||||||
- a `#!c FILE` pointer (throws if null)
|
- a `#!c FILE` pointer (throws if null)
|
||||||
- a C-style array of characters
|
- a C-style array of characters
|
||||||
- a pointer to a null-terminated string of single byte characters (throws if null)
|
- a pointer to a null-terminated string of single byte characters (throws if null)
|
||||||
- a `std::string` or a `std::string_view` (C++17)
|
- a `std::string`
|
||||||
- a container `obj` for which `begin(obj)` and `end(obj)` produce a valid pair of iterators
|
- an object `obj` for which `begin(obj)` and `end(obj)` produces a valid pair of iterators.
|
||||||
(as found via ADL or member functions, with semantics compatible to `std::begin` and `std::end`)
|
|
||||||
- wide characters (`wchar_t`, `char16_t`, `char32_t`), which are converted to UTF-8: a wide string object
|
|
||||||
(`std::wstring`, `std::u16string`, `std::u32string`) or an array (e.g. a wide string literal); a pointer to a
|
|
||||||
null-terminated wide string (e.g. `std::u16string::c_str()`) is not supported
|
|
||||||
|
|
||||||
`IteratorType`
|
`IteratorType`
|
||||||
: a compatible iterator type, for instance.
|
: a compatible iterator type, for instance.
|
||||||
@@ -51,12 +41,6 @@ Unlike the [`parse()`](parse.md) function, this function neither throws an excep
|
|||||||
- a pair of `std::string::iterator` or `std::vector<std::uint8_t>::iterator`
|
- a pair of `std::string::iterator` or `std::vector<std::uint8_t>::iterator`
|
||||||
- a pair of pointers such as `ptr` and `ptr + len`
|
- a pair of pointers such as `ptr` and `ptr + len`
|
||||||
|
|
||||||
`SentinelType`
|
|
||||||
: defaults to `IteratorType`; may be a different type comparable to `IteratorType` via `operator!=`, for instance.
|
|
||||||
|
|
||||||
- a custom sentinel type for C++20 ranges
|
|
||||||
- `std::default_sentinel_t`, when `IteratorType` is `std::counted_iterator`
|
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
`i` (in)
|
`i` (in)
|
||||||
@@ -66,15 +50,11 @@ Unlike the [`parse()`](parse.md) function, this function neither throws an excep
|
|||||||
: whether comments should be ignored and treated like whitespace (`#!cpp true`) or yield a parse error
|
: whether comments should be ignored and treated like whitespace (`#!cpp true`) or yield a parse error
|
||||||
(`#!cpp false`); (optional, `#!cpp false` by default)
|
(`#!cpp false`); (optional, `#!cpp false` by default)
|
||||||
|
|
||||||
`ignore_trailing_commas` (in)
|
|
||||||
: whether trailing commas in arrays or objects should be ignored and treated like whitespace (`#!cpp true`) or yield a parse error
|
|
||||||
(`#!cpp false`); (optional, `#!cpp false` by default)
|
|
||||||
|
|
||||||
`first` (in)
|
`first` (in)
|
||||||
: iterator to the start of the character range
|
: iterator to the start of the character range
|
||||||
|
|
||||||
`last` (in)
|
`last` (in)
|
||||||
: iterator to the end of the character range, or a sentinel value that compares equal to the end iterator with `operator!=`
|
: iterator to the end of the character range
|
||||||
|
|
||||||
## Return value
|
## Return value
|
||||||
|
|
||||||
@@ -96,13 +76,9 @@ Linear in the length of the input. The parser is a predictive LL(1) parser.
|
|||||||
|
|
||||||
A UTF-8 byte order mark is silently ignored.
|
A UTF-8 byte order mark is silently ignored.
|
||||||
|
|
||||||
By default, a `'\0'` (NUL) byte anywhere in the input is treated as end of input, rather than as an ordinary (and,
|
|
||||||
outside of a string, invalid) byte; see the [FAQ entry](../../home/faq.md#nul-bytes-in-the-input) for details and the
|
|
||||||
[`JSON_STRICT_NUL_HANDLING`](../macros/json_strict_nul_handling.md) macro to opt into rejecting it instead.
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
??? example "Example: (1) reading from a string"
|
??? example
|
||||||
|
|
||||||
The example below demonstrates the `accept()` function reading from a string.
|
The example below demonstrates the `accept()` function reading from a string.
|
||||||
|
|
||||||
@@ -116,70 +92,16 @@ outside of a string, invalid) byte; see the [FAQ entry](../../home/faq.md#nul-by
|
|||||||
--8<-- "examples/accept__string.output"
|
--8<-- "examples/accept__string.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
??? example "Example: (2) reading from an iterator pair"
|
|
||||||
|
|
||||||
The example below demonstrates the `accept()` function reading from an iterator pair. Only the first call covers
|
|
||||||
exactly the JSON text; the second one also covers the trailing bytes and is therefore rejected.
|
|
||||||
|
|
||||||
```cpp
|
|
||||||
--8<-- "examples/accept__iterator_pair.cpp"
|
|
||||||
```
|
|
||||||
|
|
||||||
Output:
|
|
||||||
|
|
||||||
```json
|
|
||||||
--8<-- "examples/accept__iterator_pair.output"
|
|
||||||
```
|
|
||||||
|
|
||||||
??? example "Example: (3) reading from UTF-16 strings"
|
|
||||||
|
|
||||||
The encoding is deduced from the character type of the input. String literals like `u"..."`, `U"..."`, and
|
|
||||||
`L"..."` work as well.
|
|
||||||
|
|
||||||
```cpp
|
|
||||||
--8<-- "examples/accept__wide_string.cpp"
|
|
||||||
```
|
|
||||||
|
|
||||||
Output:
|
|
||||||
|
|
||||||
```json
|
|
||||||
--8<-- "examples/accept__wide_string.output"
|
|
||||||
```
|
|
||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [`parse`](parse.md) - deserialize from a compatible input
|
- [parse](parse.md) - deserialize from a compatible input
|
||||||
- [`sax_parse`](sax_parse.md) - parse input using the SAX interface
|
- [operator>>](../operator_gtgt.md) - deserialize from stream
|
||||||
- [`operator>>`](../operator_gtgt.md) - deserialize from stream
|
|
||||||
- [`JSON_STRICT_NUL_HANDLING`](../macros/json_strict_nul_handling.md) - opt in to rejecting a NUL byte in the input
|
|
||||||
instead of treating it as end of input
|
|
||||||
- [`JSON_DISABLE_STREAM_BULK_SCAN`](../macros/json_disable_stream_bulk_scan.md) - read a `std::istream` one character
|
|
||||||
at a time
|
|
||||||
- [`JSON_DISABLE_UNLOCKED_FILE_IO`](../macros/json_disable_unlocked_file_io.md) - read a `FILE*` with the locking stdio
|
|
||||||
functions
|
|
||||||
- [Parsing](../../features/parsing/index.md) - overview of the parsing functions
|
|
||||||
- [Comments](../../features/comments.md) - ignore `//` and `/* */` comments while parsing
|
|
||||||
- [Trailing Commas](../../features/trailing_commas.md) - accept trailing commas in arrays and objects
|
|
||||||
- [Parsing and Exceptions](../../features/parsing/parse_exceptions.md) - handling parse errors and locating them in the input
|
|
||||||
- [Parsing Untrusted Input](../../features/parsing/untrusted_input.md) - limits and checks for input you do not control
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 3.0.0.
|
- Added in version 3.0.0.
|
||||||
- Ignoring comments via `ignore_comments` added in version 3.9.0.
|
- Ignoring comments via `ignore_comments` added in version 3.9.0.
|
||||||
- Changed [runtime assertion](../../features/assertions.md) in case of `FILE*` null pointers to exception in version 3.12.0.
|
- Changed [runtime assertion](../../features/assertions.md) in case of `FILE*` null pointers to exception in version 3.12.0.
|
||||||
- Added `ignore_trailing_commas` in version 3.13.0.
|
|
||||||
- Extended container support (1) to include types with lvalue-only ADL `begin`/`end` (matching `std::begin`/`std::end` semantics) in version 3.13.0.
|
|
||||||
- Extended overload (2) to accept heterogeneous iterator+sentinel pairs (C++20 ranges support) in version 3.13.0.
|
|
||||||
- `JSON_STRICT_NUL_HANDLING` added in version 3.13.0 to optionally reject a NUL byte in the input instead of treating
|
|
||||||
it as end of input; planned to become the default in version 4.0.0.
|
|
||||||
- Parsing from an `std::istream` scans the characters in its stream buffer in bulk in version 3.13.0
|
|
||||||
([`JSON_DISABLE_STREAM_BULK_SCAN`](../macros/json_disable_stream_bulk_scan.md)).
|
|
||||||
- Parsing from a `FILE*` locks the file once instead of once per character in version 3.13.0
|
|
||||||
([`JSON_DISABLE_UNLOCKED_FILE_IO`](../macros/json_disable_unlocked_file_io.md)).
|
|
||||||
- Ill-formed UTF-16 and UTF-32 input (a lone surrogate, a high surrogate that is not followed by its low surrogate, or
|
|
||||||
a code point above `U+10FFFF`) is rejected in version 3.13.0; before that, some such sequences were accepted or
|
|
||||||
ended the input silently.
|
|
||||||
|
|
||||||
!!! warning "Deprecation"
|
!!! warning "Deprecation"
|
||||||
|
|
||||||
@@ -189,5 +111,3 @@ outside of a string, invalid) byte; see the [FAQ entry](../../home/faq.md#nul-by
|
|||||||
|
|
||||||
You should be warned by your compiler with a `-Wdeprecated-declarations` warning if you are using a deprecated
|
You should be warned by your compiler with a `-Wdeprecated-declarations` warning if you are using a deprecated
|
||||||
function.
|
function.
|
||||||
|
|
||||||
See the [migration guide](../../integration/migration_guide.md#parsing) for how to update existing code.
|
|
||||||
@@ -29,9 +29,9 @@ Linear in the size of `init`.
|
|||||||
This function is only needed to express two edge cases that cannot be realized with the initializer list constructor
|
This function is only needed to express two edge cases that cannot be realized with the initializer list constructor
|
||||||
([`basic_json(initializer_list_t, bool, value_t)`](basic_json.md)). These cases are:
|
([`basic_json(initializer_list_t, bool, value_t)`](basic_json.md)). These cases are:
|
||||||
|
|
||||||
1. creating an array whose elements are all pairs whose first element is a string — in this case, the initializer list
|
1. creating an array whose elements are all pairs whose first element is a string -- in this case, the initializer list
|
||||||
constructor would create an object, taking the first elements as keys
|
constructor would create an object, taking the first elements as keys
|
||||||
2. creating an empty array — passing the empty initializer list to the initializer list constructor yields an empty
|
2. creating an empty array -- passing the empty initializer list to the initializer list constructor yields an empty
|
||||||
object
|
object
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
@@ -54,7 +54,6 @@ This function is only needed to express two edge cases that cannot be realized w
|
|||||||
|
|
||||||
- [`basic_json(initializer_list_t)`](basic_json.md) - create a JSON value from an initializer list
|
- [`basic_json(initializer_list_t)`](basic_json.md) - create a JSON value from an initializer list
|
||||||
- [`object`](object.md) - create a JSON object value from an initializer list
|
- [`object`](object.md) - create a JSON object value from an initializer list
|
||||||
- [Creating JSON values](../../features/creating_values.md) - the article on creating JSON values
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
|
|||||||
@@ -14,20 +14,16 @@ To store objects in C++, a type is defined by the template parameters explained
|
|||||||
## Template parameters
|
## Template parameters
|
||||||
|
|
||||||
`ArrayType`
|
`ArrayType`
|
||||||
: container type to store arrays. It must be a vector-like container: the library uses `operator[]`, `at()`, and
|
: container type to store arrays (e.g., `std::vector` or `std::list`)
|
||||||
`resize()`, and requires random-access iterators. `#!cpp std::vector` and `#!cpp std::deque` qualify;
|
|
||||||
`#!cpp std::list` does not. See
|
|
||||||
[Template Parameter Requirements](../../features/types/template_parameters.md#arraytype) for the full list of
|
|
||||||
requirements.
|
|
||||||
|
|
||||||
`AllocatorType`
|
`AllocatorType`
|
||||||
: the allocator to use for objects (e.g., `std::allocator`)
|
: the allocator to use for objects (e.g., `std::allocator`)
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
### Default type
|
#### Default type
|
||||||
|
|
||||||
With the default values for `ArrayType` (`std::vector`) and `AllocatorType` (`std::allocator`), the default type for
|
With the default values for `ArrayType` (`std::vector`) and `AllocatorType` (`std::allocator`), the default value for
|
||||||
`array_t` is:
|
`array_t` is:
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
@@ -37,7 +33,7 @@ std::vector<
|
|||||||
>
|
>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Limits
|
#### Limits
|
||||||
|
|
||||||
[RFC 8259](https://tools.ietf.org/html/rfc8259) specifies:
|
[RFC 8259](https://tools.ietf.org/html/rfc8259) specifies:
|
||||||
> An implementation may set limits on the maximum depth of nesting.
|
> An implementation may set limits on the maximum depth of nesting.
|
||||||
@@ -46,7 +42,7 @@ In this class, the array's limit of nesting is not explicitly constrained. Howev
|
|||||||
introduced by the compiler or runtime environment. A theoretical limit can be queried by calling the
|
introduced by the compiler or runtime environment. A theoretical limit can be queried by calling the
|
||||||
[`max_size`](max_size.md) function of a JSON array.
|
[`max_size`](max_size.md) function of a JSON array.
|
||||||
|
|
||||||
### Storage
|
#### Storage
|
||||||
|
|
||||||
Arrays are stored as pointers in a `basic_json` type. That is, for any access to array values, a pointer of type
|
Arrays are stored as pointers in a `basic_json` type. That is, for any access to array values, a pointer of type
|
||||||
`#!cpp array_t*` must be dereferenced.
|
`#!cpp array_t*` must be dereferenced.
|
||||||
@@ -67,16 +63,6 @@ Arrays are stored as pointers in a `basic_json` type. That is, for any access to
|
|||||||
--8<-- "examples/array_t.output"
|
--8<-- "examples/array_t.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`object_t`](object_t.md) - the type used to store JSON objects
|
|
||||||
- [`binary_t`](binary_t.md) - the type used to store binary values
|
|
||||||
- [`is_array`](is_array.md) - checks whether the JSON value is an array
|
|
||||||
- [`max_size`](max_size.md) - returns the maximum possible number of elements
|
|
||||||
- [Types](../../features/types/index.md) - how arrays are stored
|
|
||||||
- [Template Parameter Requirements](../../features/types/template_parameters.md) - requirements on the `ArrayType` template parameter
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 1.0.0.
|
- Added in version 1.0.0.
|
||||||
- Made `capacity()` optional, so that array types such as `#!cpp std::deque` can be used, in version 3.13.0.
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
# <small>nlohmann::basic_json::</small>as_base_class
|
|
||||||
|
|
||||||
```cpp
|
|
||||||
json_base_class_t& as_base_class() noexcept;
|
|
||||||
const json_base_class_t& as_base_class() const noexcept;
|
|
||||||
```
|
|
||||||
|
|
||||||
Returns a reference to this object as its custom base class [`json_base_class_t`](json_base_class_t.md). No copy is
|
|
||||||
made.
|
|
||||||
|
|
||||||
Since `basic_json` derives from `json_base_class_t`, a member of `basic_json` hides any member of the custom base class
|
|
||||||
with the same name. This function makes such hidden members accessible again.
|
|
||||||
|
|
||||||
## Return value
|
|
||||||
|
|
||||||
reference to this object as [`json_base_class_t`](json_base_class_t.md)
|
|
||||||
|
|
||||||
## Exception safety
|
|
||||||
|
|
||||||
No-throw guarantee: this function never throws exceptions.
|
|
||||||
|
|
||||||
## Complexity
|
|
||||||
|
|
||||||
Constant.
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
The function is equivalent to `static_cast<json_base_class_t&>(j)` (or `static_cast<const json_base_class_t&>(j)`).
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
??? example
|
|
||||||
|
|
||||||
The example shows how to use `as_base_class` to access members of the custom base class that are hidden by members
|
|
||||||
of `basic_json`.
|
|
||||||
|
|
||||||
```cpp
|
|
||||||
--8<-- "examples/as_base_class.cpp"
|
|
||||||
```
|
|
||||||
|
|
||||||
Output:
|
|
||||||
|
|
||||||
```json
|
|
||||||
--8<-- "examples/as_base_class.output"
|
|
||||||
```
|
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`json_base_class_t`](json_base_class_t.md) - type of the custom base class
|
|
||||||
- [Template Parameter Requirements](../../features/types/template_parameters.md) - requirements on the `CustomBaseClass` template parameter
|
|
||||||
|
|
||||||
## Version history
|
|
||||||
|
|
||||||
- Added in version 3.13.0.
|
|
||||||
@@ -82,30 +82,13 @@ Strong exception safety: if an exception occurs, the original value stays intact
|
|||||||
key of an object which cannot be found. See the example below.
|
key of an object which cannot be found. See the example below.
|
||||||
- Throws [`out_of_range.404`](../../home/exceptions.md#jsonexceptionout_of_range404) if the JSON pointer `ptr` can
|
- Throws [`out_of_range.404`](../../home/exceptions.md#jsonexceptionout_of_range404) if the JSON pointer `ptr` can
|
||||||
not be resolved. See the example below.
|
not be resolved. See the example below.
|
||||||
- Throws [`out_of_range.410`](../../home/exceptions.md#jsonexceptionout_of_range410) if an array index in the passed
|
|
||||||
JSON pointer `ptr` exceeds the range of `size_type` (e.g., on 32-bit platforms).
|
|
||||||
|
|
||||||
## Complexity
|
## Complexity
|
||||||
|
|
||||||
1. Constant.
|
1. Constant.
|
||||||
2. Logarithmic in the size of the container.
|
2. Logarithmic in the size of the container.
|
||||||
3. Logarithmic in the size of the container.
|
3. Logarithmic in the size of the container.
|
||||||
4. Linear in the number of reference tokens of `ptr`; for each of them, logarithmic in the size of the object, or
|
4. Logarithmic in the size of the container.
|
||||||
constant for an array.
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
!!! warning "Deprecation"
|
|
||||||
|
|
||||||
Overload (4) also accepts a [`json_pointer`](../json_pointer/index.md) whose template argument is a `basic_json`
|
|
||||||
specialization (e.g., `nlohmann::json_pointer<nlohmann::json>`) instead of a string type. This is deprecated since
|
|
||||||
version 3.11.0 and will be removed in a future major version; use `basic_json::json_pointer` (for `json`,
|
|
||||||
`nlohmann::json_pointer<std::string>`) instead.
|
|
||||||
|
|
||||||
You should be warned by your compiler with a `-Wdeprecated-declarations` warning if you are using a deprecated
|
|
||||||
function.
|
|
||||||
|
|
||||||
See the [migration guide](../../integration/migration_guide.md#json-pointers) for how to update existing code.
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
@@ -231,19 +214,13 @@ Strong exception safety: if an exception occurs, the original value stays intact
|
|||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [Checked access](../../features/element_access/checked_access.md) - element access with range checking
|
- documentation on [checked access](../../features/element_access/checked_access.md)
|
||||||
- [`operator[]`](operator%5B%5D.md) - unchecked access by reference
|
- [`operator[]`](operator%5B%5D.md) for unchecked access by reference
|
||||||
- [`value`](value.md) - access with default value
|
- [`value`](value.md) for access with default value
|
||||||
- [`basic_json_view::at`](../basic_json_view/at.md) - the same access on a zero-copy view
|
|
||||||
- [Element Access](../../features/element_access/index.md) - overview of all ways to access elements
|
|
||||||
- [JSON Pointer](../../features/json_pointer.md) - access nested values with a pointer
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
1. Added in version 1.0.0.
|
1. Added in version 1.0.0.
|
||||||
2. Added in version 1.0.0.
|
2. Added in version 1.0.0.
|
||||||
3. Added in version 3.11.0. Support for keys convertible to `std::string_view` added in version 3.13.0, consistently
|
3. Added in version 3.11.0.
|
||||||
across the lookup functions.
|
4. Added in version 2.0.0.
|
||||||
4. Added in version 2.0.0. Throws [`parse_error.109`](../../home/exceptions.md#jsonexceptionparse_error109) instead of
|
|
||||||
[`out_of_range.404`](../../home/exceptions.md#jsonexceptionout_of_range404) for a one-character array index that is not
|
|
||||||
a digit (e.g., `/x`) in version 3.13.0, as it already did for longer ones.
|
|
||||||
@@ -57,11 +57,9 @@ Constant.
|
|||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [`front`](front.md) - to access the first element
|
- [front](front.md) to access the first element
|
||||||
- [`basic_json_view::back`](../basic_json_view/back.md) - the same access on a zero-copy view
|
|
||||||
- [Element Access](../../features/element_access/index.md) - overview of all ways to access elements
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 1.0.0.
|
- Added in version 1.0.0.
|
||||||
- Binary values are supported since version 3.8.0.
|
- Adjusted code to return reference to binary values in version 3.8.0.
|
||||||
@@ -52,7 +52,7 @@ basic_json(basic_json&& other) noexcept;
|
|||||||
The postcondition of this constructor can be restored by calling [`clear()`](clear.md).
|
The postcondition of this constructor can be restored by calling [`clear()`](clear.md).
|
||||||
|
|
||||||
2. Create a `#!json null` JSON value. It either takes a null pointer as parameter (explicitly creating `#!json null`)
|
2. Create a `#!json null` JSON value. It either takes a null pointer as parameter (explicitly creating `#!json null`)
|
||||||
or no parameter (implicitly creating `#!json null`). The passed null pointer itself is not read — it is only used to
|
or no parameter (implicitly creating `#!json null`). The passed null pointer itself is not read -- it is only used to
|
||||||
choose the right constructor.
|
choose the right constructor.
|
||||||
|
|
||||||
3. This is a "catch all" constructor for all compatible JSON types; that is, types for which a `to_json()` method
|
3. This is a "catch all" constructor for all compatible JSON types; that is, types for which a `to_json()` method
|
||||||
@@ -68,21 +68,13 @@ basic_json(basic_json&& other) noexcept;
|
|||||||
`std::unordered_map`, `std::multimap`, and `std::unordered_multimap` with a `key_type` compatible to `string_t`
|
`std::unordered_map`, `std::multimap`, and `std::unordered_multimap` with a `key_type` compatible to `string_t`
|
||||||
and a `value_type` from which a `basic_json` value can be constructed.
|
and a `value_type` from which a `basic_json` value can be constructed.
|
||||||
- **strings**: `string_t`, string literals, and all compatible string containers can be used.
|
- **strings**: `string_t`, string literals, and all compatible string containers can be used.
|
||||||
|
|
||||||
!!! note "Rvalue containers are moved from"
|
|
||||||
|
|
||||||
If `val` is an rvalue of a compatible array-like or object-like container other than `array_t`/`object_t`
|
|
||||||
(e.g., `json j = std::move(vec);` or `json j(std::vector<std::string>{...});`), the elements are moved into
|
|
||||||
the JSON value instead of copied. Afterwards, the elements of the source container are in a valid but
|
|
||||||
unspecified state (**moved-from**). Keys of associative containers are `const` and therefore still copied.
|
|
||||||
Lvalues and `const` rvalues are copied, and the source is left unchanged.
|
|
||||||
- **numbers**: [`number_integer_t`](number_integer_t.md), [`number_unsigned_t`](number_unsigned_t.md),
|
- **numbers**: [`number_integer_t`](number_integer_t.md), [`number_unsigned_t`](number_unsigned_t.md),
|
||||||
[`number_float_t`](number_float_t.md), and all convertible number types such as `int`, `size_t`, `int64_t`, `float`
|
[`number_float_t`](number_float_t.md), and all convertible number types such as `int`, `size_t`, `int64_t`, `float`
|
||||||
or `double` can be used.
|
or `double` can be used.
|
||||||
- **boolean**: `boolean_t` / `bool` can be used.
|
- **boolean**: `boolean_t` / `bool` can be used.
|
||||||
- **binary**: `binary_t` / `std::vector<uint8_t>` may be used; unfortunately because string literals cannot be
|
- **binary**: `binary_t` / `std::vector<uint8_t>` may be used; unfortunately because string literals cannot be
|
||||||
distinguished from binary character arrays by the C++ type system, all types compatible with `const char*` will be
|
distinguished from binary character arrays by the C++ type system, all types compatible with `const char*` will be
|
||||||
directed to the string constructor instead. This is both for backwards compatibility and due to the fact that a
|
directed to the string constructor instead. This is both for backwards compatibility, and due to the fact that a
|
||||||
binary type is not a standard JSON type.
|
binary type is not a standard JSON type.
|
||||||
|
|
||||||
See the examples below.
|
See the examples below.
|
||||||
@@ -90,13 +82,7 @@ basic_json(basic_json&& other) noexcept;
|
|||||||
4. This is a constructor for existing `basic_json` types. It does not hijack copy/move constructors, since the parameter
|
4. This is a constructor for existing `basic_json` types. It does not hijack copy/move constructors, since the parameter
|
||||||
has different template arguments than the current ones.
|
has different template arguments than the current ones.
|
||||||
|
|
||||||
The constructor tries to convert the internal `m_value` of the parameter. Each member value (object, array, string,
|
The constructor tries to convert the internal `m_value` of the parameter.
|
||||||
etc.) is serialized via the corresponding `to_json()` overload. For objects and strings, the conversion requires
|
|
||||||
that the *target* `basic_json` type's `object_t::key_type` (or `string_t`) be directly constructible from the
|
|
||||||
*source* type's corresponding member type via `is_constructible`. If this requirement is not met, the conversion
|
|
||||||
does not fail to compile; instead, it silently falls back to the array-conversion path, which represents objects
|
|
||||||
as arrays of `[key, value]` pairs and strings as arrays of character codes. This is a known limitation tracked in
|
|
||||||
[issue #3425](https://github.com/nlohmann/json/issues/3425).
|
|
||||||
|
|
||||||
5. Creates a JSON value of type array or object from the passed initializer list `init`. In case `type_deduction` is
|
5. Creates a JSON value of type array or object from the passed initializer list `init`. In case `type_deduction` is
|
||||||
`#!cpp true` (default), the type of the JSON value to be created is deducted from the initializer list `init`
|
`#!cpp true` (default), the type of the JSON value to be created is deducted from the initializer list `init`
|
||||||
@@ -107,28 +93,6 @@ basic_json(basic_json&& other) noexcept;
|
|||||||
elements of the pairs are treated as keys and the second elements are as values.
|
elements of the pairs are treated as keys and the second elements are as values.
|
||||||
3. In all other cases, an array is created.
|
3. In all other cases, an array is created.
|
||||||
|
|
||||||
The following flowchart also takes into account what happens when `type_deduction` is `#!cpp false`, in which case
|
|
||||||
`manual_type` decides between object and array, and an object can only be forced if `init` actually matches rule 2
|
|
||||||
(or is empty):
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
flowchart TD
|
|
||||||
A(["initializer_list init"]) --> B{{"empty, or every element is a 2-element<br/>array whose first element is a string?"}}
|
|
||||||
B -->|"yes"| C{{"type_deduction"}}
|
|
||||||
B -->|"no"| D{{"type_deduction"}}
|
|
||||||
C -->|"true"| OBJ["create object"]
|
|
||||||
C -->|"false"| E{{"manual_type"}}
|
|
||||||
E -->|"object"| OBJ
|
|
||||||
E -->|"array"| ARR["create array"]
|
|
||||||
D -->|"true"| ARR
|
|
||||||
D -->|"false"| F{{"manual_type"}}
|
|
||||||
F -->|"array"| ARR
|
|
||||||
F -->|"object"| ERR["throw type_error.301"]
|
|
||||||
```
|
|
||||||
|
|
||||||
<p class="nj-caption" markdown>Decision flow for an initializer list: hexagons are checks, edge labels are their
|
|
||||||
outcomes, and rectangles are the resulting value or exception.</p>
|
|
||||||
|
|
||||||
The rules aim to create the best fit between a C++ initializer list and JSON values. The rationale is as follows:
|
The rules aim to create the best fit between a C++ initializer list and JSON values. The rationale is as follows:
|
||||||
|
|
||||||
1. The empty initializer list is written as `#!cpp {}` which is exactly an empty JSON object.
|
1. The empty initializer list is written as `#!cpp {}` which is exactly an empty JSON object.
|
||||||
@@ -145,22 +109,7 @@ basic_json(basic_json&& other) noexcept;
|
|||||||
|
|
||||||
Function [`array()`](array.md) and [`object()`](object.md) force array and object creation from initializer lists,
|
Function [`array()`](array.md) and [`object()`](object.md) force array and object creation from initializer lists,
|
||||||
respectively.
|
respectively.
|
||||||
|
|
||||||
!!! warning "Brace initialization yields arrays"
|
|
||||||
|
|
||||||
Because this constructor takes an `initializer_list_t`, brace-initializing a `json`/`ordered_json` from
|
|
||||||
another `json` value wraps it in a single-element array rather than copying it:
|
|
||||||
|
|
||||||
```cpp
|
|
||||||
json j1 = "hello";
|
|
||||||
json j2{j1}; // [!] j2 is ["hello"], NOT a copy of j1
|
|
||||||
json j3(j1); // j3 is "hello" -- parentheses copy as expected
|
|
||||||
```
|
|
||||||
|
|
||||||
See the FAQ entry on [brace initialization](../../home/faq.md#brace-initialization-yields-arrays) for the
|
|
||||||
full explanation, an opt-in macro to change this behavior, and how to explicitly create a single-element
|
|
||||||
array (`json::array({value})`) if that is what you want.
|
|
||||||
|
|
||||||
6. Constructs a JSON array value by creating `cnt` copies of a passed value. In case `cnt` is `0`, an empty array is
|
6. Constructs a JSON array value by creating `cnt` copies of a passed value. In case `cnt` is `0`, an empty array is
|
||||||
created.
|
created.
|
||||||
|
|
||||||
@@ -169,8 +118,8 @@ basic_json(basic_json&& other) noexcept;
|
|||||||
|
|
||||||
- In case of a `#!json null` type, [invalid_iterator.206](../../home/exceptions.md#jsonexceptioninvalid_iterator206)
|
- In case of a `#!json null` type, [invalid_iterator.206](../../home/exceptions.md#jsonexceptioninvalid_iterator206)
|
||||||
is thrown.
|
is thrown.
|
||||||
- In case of other primitive types (number, boolean, string, or binary), `first` must be `begin()` and `last`
|
- In case of other primitive types (number, boolean, or string), `first` must be `begin()` and `last` must be
|
||||||
must be `end()`. In this case, the value is copied. Otherwise,
|
`end()`. In this case, the value is copied. Otherwise,
|
||||||
[`invalid_iterator.204`](../../home/exceptions.md#jsonexceptioninvalid_iterator204) is thrown.
|
[`invalid_iterator.204`](../../home/exceptions.md#jsonexceptioninvalid_iterator204) is thrown.
|
||||||
- In case of structured types (array, object), the constructor behaves as similar versions for `std::vector` or
|
- In case of structured types (array, object), the constructor behaves as similar versions for `std::vector` or
|
||||||
`std::map`; that is, a JSON array or object is constructed from the values in the range.
|
`std::map`; that is, a JSON array or object is constructed from the values in the range.
|
||||||
@@ -189,8 +138,6 @@ basic_json(basic_json&& other) noexcept;
|
|||||||
- `CompatibleType` is not `basic_json` (to avoid hijacking copy/move constructors),
|
- `CompatibleType` is not `basic_json` (to avoid hijacking copy/move constructors),
|
||||||
- `CompatibleType` is not a different `basic_json` type (i.e. with different template arguments)
|
- `CompatibleType` is not a different `basic_json` type (i.e. with different template arguments)
|
||||||
- `CompatibleType` is not a `basic_json` nested type (e.g., `json_pointer`, `iterator`, etc.)
|
- `CompatibleType` is not a `basic_json` nested type (e.g., `json_pointer`, `iterator`, etc.)
|
||||||
- if [`JSON_DISABLE_TUPLE_REFERENCE_CONVERSION`](../macros/json_disable_tuple_reference_conversion.md) is defined
|
|
||||||
to `1`: `CompatibleType` is not a one-element `std::tuple` holding a reference to `basic_json`
|
|
||||||
- `json_serializer<U>` (with `U = uncvref_t<CompatibleType>`) has a `to_json(basic_json_t&, CompatibleType&&)`
|
- `json_serializer<U>` (with `U = uncvref_t<CompatibleType>`) has a `to_json(basic_json_t&, CompatibleType&&)`
|
||||||
method
|
method
|
||||||
|
|
||||||
@@ -199,11 +146,6 @@ basic_json(basic_json&& other) noexcept;
|
|||||||
|
|
||||||
- `BasicJsonType` is a `basic_json` type.
|
- `BasicJsonType` is a `basic_json` type.
|
||||||
- `BasicJsonType` has different template arguments than `basic_json_t`.
|
- `BasicJsonType` has different template arguments than `basic_json_t`.
|
||||||
|
|
||||||
**Note:** For cross-`basic_json` conversions to produce correct results, the target `basic_json`'s
|
|
||||||
[`object_t`](object_t.md)`::key_type` and [`string_t`](string_t.md) must be directly constructible from the source
|
|
||||||
`basic_json`'s corresponding types. See the description of overload (4) above for details on what happens when
|
|
||||||
this requirement is not met.
|
|
||||||
|
|
||||||
`U`:
|
`U`:
|
||||||
: `uncvref_t<CompatibleType>`
|
: `uncvref_t<CompatibleType>`
|
||||||
@@ -247,9 +189,7 @@ basic_json(basic_json&& other) noexcept;
|
|||||||
2. No-throw guarantee: this constructor never throws exceptions.
|
2. No-throw guarantee: this constructor never throws exceptions.
|
||||||
3. Depends on the called constructor. For types directly supported by the library (i.e., all types for which no
|
3. Depends on the called constructor. For types directly supported by the library (i.e., all types for which no
|
||||||
`to_json()` function was provided), a strong guarantee holds: if an exception is thrown, there are no changes to any
|
`to_json()` function was provided), a strong guarantee holds: if an exception is thrown, there are no changes to any
|
||||||
JSON value. **Exception:** when `val` is an rvalue array-like or object-like container, its elements are moved one
|
JSON value.
|
||||||
by one; if an exception is thrown in the middle of the conversion (e.g., an allocation failure), the JSON value is
|
|
||||||
unchanged, but the source container may be left partially moved-from.
|
|
||||||
4. Depends on the called constructor. For types directly supported by the library (i.e., all types for which no
|
4. Depends on the called constructor. For types directly supported by the library (i.e., all types for which no
|
||||||
`to_json()` function was provided), a strong guarantee holds: if an exception is thrown, there are no changes to any
|
`to_json()` function was provided), a strong guarantee holds: if an exception is thrown, there are no changes to any
|
||||||
JSON value.
|
JSON value.
|
||||||
@@ -276,8 +216,8 @@ basic_json(basic_json&& other) noexcept;
|
|||||||
and `last` are not compatible (i.e., do not belong to the same JSON value). In this case, the range
|
and `last` are not compatible (i.e., do not belong to the same JSON value). In this case, the range
|
||||||
`[first, last)` is undefined.
|
`[first, last)` is undefined.
|
||||||
- Throws [`invalid_iterator.204`](../../home/exceptions.md#jsonexceptioninvalid_iterator204) if iterators `first`
|
- Throws [`invalid_iterator.204`](../../home/exceptions.md#jsonexceptioninvalid_iterator204) if iterators `first`
|
||||||
and `last` belong to a primitive type (number, boolean, string, or binary), but `first` does not point to the
|
and `last` belong to a primitive type (number, boolean, or string), but `first` does not point to the first
|
||||||
first element anymore. In this case, the range `[first, last)` is undefined. See the example code below.
|
element anymore. In this case, the range `[first, last)` is undefined. See the example code below.
|
||||||
- Throws [`invalid_iterator.206`](../../home/exceptions.md#jsonexceptioninvalid_iterator206) if iterators `first`
|
- Throws [`invalid_iterator.206`](../../home/exceptions.md#jsonexceptioninvalid_iterator206) if iterators `first`
|
||||||
and `last` belong to a `#!json null` value. In this case, the range `[first, last)` is undefined.
|
and `last` belong to a `#!json null` value. In this case, the range `[first, last)` is undefined.
|
||||||
8. (none)
|
8. (none)
|
||||||
@@ -306,15 +246,6 @@ basic_json(basic_json&& other) noexcept;
|
|||||||
When used without parentheses around an empty initializer list, `basic_json()` is called instead of this
|
When used without parentheses around an empty initializer list, `basic_json()` is called instead of this
|
||||||
function, yielding the JSON `#!json null` value.
|
function, yielding the JSON `#!json null` value.
|
||||||
|
|
||||||
- Overload 4:
|
|
||||||
|
|
||||||
!!! info "Implicit conversion"
|
|
||||||
|
|
||||||
The conversion is implicit unless [`JSON_USE_IMPLICIT_CONVERSIONS`](../macros/json_use_implicit_conversions.md)
|
|
||||||
is defined to `0` and `BasicJsonType::string_t` differs from `string_t`. In that case, the constructor is
|
|
||||||
`explicit`, so a JSON value with a different string type is no longer silently converted, for example when it is
|
|
||||||
passed to a function taking `#!cpp const json&`. Write `#!cpp json(other)` or `#!cpp other.get<json>()` instead.
|
|
||||||
|
|
||||||
- Overload 7:
|
- Overload 7:
|
||||||
|
|
||||||
!!! info "Preconditions"
|
!!! info "Preconditions"
|
||||||
@@ -388,22 +319,6 @@ basic_json(basic_json&& other) noexcept;
|
|||||||
|
|
||||||
Note the output is platform-dependent.
|
Note the output is platform-dependent.
|
||||||
|
|
||||||
??? example "Example: (4) create a JSON value from another `basic_json` specialization"
|
|
||||||
|
|
||||||
The example below shows how a `json` value is converted to an `ordered_json` value and back using the converting
|
|
||||||
constructor. Note how the original insertion order of `oj` is not restored, because it was already given up when
|
|
||||||
converting to `json`, whose `object_t` sorts by key.
|
|
||||||
|
|
||||||
```cpp
|
|
||||||
--8<-- "examples/basic_json__BasicJsonType.cpp"
|
|
||||||
```
|
|
||||||
|
|
||||||
Output:
|
|
||||||
|
|
||||||
```json
|
|
||||||
--8<-- "examples/basic_json__BasicJsonType.output"
|
|
||||||
```
|
|
||||||
|
|
||||||
??? example "Example: (5) create a container (array or object) from an initializer list"
|
??? example "Example: (5) create a container (array or object) from an initializer list"
|
||||||
|
|
||||||
The example below shows how JSON values are created from initializer lists.
|
The example below shows how JSON values are created from initializer lists.
|
||||||
@@ -474,27 +389,14 @@ basic_json(basic_json&& other) noexcept;
|
|||||||
--8<-- "examples/basic_json__moveconstructor.output"
|
--8<-- "examples/basic_json__moveconstructor.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`array`](array.md) - create a JSON array value, forcing array creation from an initializer list even when it looks like
|
|
||||||
an object
|
|
||||||
- [`object`](object.md) - create a JSON object value, forcing object creation from an initializer list
|
|
||||||
- [`binary`](binary.md) - create a JSON binary array value
|
|
||||||
- [`operator=`](operator=.md) - copy assignment operator
|
|
||||||
- [Creating JSON values](../../features/creating_values.md) - the article on creating JSON values
|
|
||||||
- [Converting values](../../features/conversions.md) - which C++ types can be converted
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
1. Added in version 1.0.0.
|
1. Since version 1.0.0.
|
||||||
2. Added in version 1.0.0.
|
2. Since version 1.0.0.
|
||||||
3. Added in version 2.1.0.
|
3. Since version 2.1.0.
|
||||||
4. Added in version 3.1.2. Explicit for different string types if `JSON_USE_IMPLICIT_CONVERSIONS` is `0` since
|
4. Since version 3.2.0.
|
||||||
version 3.13.0.
|
5. Since version 1.0.0.
|
||||||
5. Added in version 1.0.0.
|
6. Since version 1.0.0.
|
||||||
6. Added in version 1.0.0.
|
7. Since version 1.0.0.
|
||||||
7. Added in version 1.0.0. Fixed in version 3.13.0 to also check the iterator range for binary values; before, a range
|
8. Since version 1.0.0.
|
||||||
that did not cover the whole value (such as `(end(), end())`) was accepted and the whole binary value was copied,
|
9. Since version 1.0.0.
|
||||||
unlike the other primitive types.
|
|
||||||
8. Added in version 1.0.0.
|
|
||||||
9. Added in version 1.0.0.
|
|
||||||
@@ -7,12 +7,7 @@ const_iterator begin() const noexcept;
|
|||||||
|
|
||||||
Returns an iterator to the first element.
|
Returns an iterator to the first element.
|
||||||
|
|
||||||
<div class="nj-fig-wrap" markdown>
|

|
||||||
--8<-- "images/range-begin-end.svg"
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="nj-caption" markdown>`begin()` points to the first element and `end()` to the position after the last element;
|
|
||||||
the dashed cell is the past-the-last position, which must not be dereferenced.</p>
|
|
||||||
|
|
||||||
## Return value
|
## Return value
|
||||||
|
|
||||||
@@ -42,16 +37,6 @@ Constant.
|
|||||||
--8<-- "examples/begin.output"
|
--8<-- "examples/begin.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`end`](end.md) - returns an iterator to one past the last element
|
|
||||||
- [`cbegin`](cbegin.md) - returns a const iterator to the first element
|
|
||||||
- [`rbegin`](rbegin.md) - returns a reverse iterator to the last element
|
|
||||||
- [`items`](items.md) - returns an iteration proxy to access keys and values during range-based for loops
|
|
||||||
- [Iterators](../../features/iterators.md) - the article on iterators
|
|
||||||
- [`basic_json_view::begin`](../basic_json_view/begin.md) - the same iteration on a zero-copy view (in document order,
|
|
||||||
not sorted by key)
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 1.0.0.
|
- Added in version 1.0.0.
|
||||||
@@ -7,9 +7,9 @@ static basic_json binary(typename binary_t::container_type&& init);
|
|||||||
|
|
||||||
// (2)
|
// (2)
|
||||||
static basic_json binary(const typename binary_t::container_type& init,
|
static basic_json binary(const typename binary_t::container_type& init,
|
||||||
typename binary_t::subtype_type subtype);
|
std::uint8_t subtype);
|
||||||
static basic_json binary(typename binary_t::container_type&& init,
|
static basic_json binary(typename binary_t::container_type&& init,
|
||||||
typename binary_t::subtype_type subtype);
|
std::uint8_t subtype);
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Creates a JSON binary array value from a given binary container.
|
1. Creates a JSON binary array value from a given binary container.
|
||||||
@@ -61,16 +61,6 @@ initialization of a binary array type, for backwards compatibility and so it doe
|
|||||||
--8<-- "examples/binary.output"
|
--8<-- "examples/binary.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [Binary formats](../../features/binary_formats/index.md) - formats that can store binary values
|
|
||||||
- [`binary_t`](binary_t.md) - type for binary values
|
|
||||||
- [`get_binary`](get_binary.md) - get a reference to the stored binary value
|
|
||||||
- [`is_binary`](is_binary.md) - return whether the value is binary
|
|
||||||
- [`byte_container_with_subtype`](../byte_container_with_subtype/index.md) - container for binary values with subtype
|
|
||||||
- [Binary Values](../../features/binary_values.md) - the article on binary values
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 3.8.0.
|
- Added in version 3.8.0.
|
||||||
- Changed the type of `subtype` from `std::uint8_t` to `binary_t::subtype_type` (`std::uint64_t`) in version 3.10.0.
|
|
||||||
@@ -13,8 +13,9 @@ is compatible with both of the binary data formats that use binary subtyping, (t
|
|||||||
incompatible with each other, and it is up to the user to translate between them). The subtype is added to `BinaryType`
|
incompatible with each other, and it is up to the user to translate between them). The subtype is added to `BinaryType`
|
||||||
via the helper type [byte_container_with_subtype](../byte_container_with_subtype/index.md).
|
via the helper type [byte_container_with_subtype](../byte_container_with_subtype/index.md).
|
||||||
|
|
||||||
[CBOR's RFC 8949](https://www.rfc-editor.org/rfc/rfc8949.html#section-3.1) describes this type as:
|
[CBOR's RFC 7049](https://tools.ietf.org/html/rfc7049) describes this type as:
|
||||||
> Major type 2: A byte string. The number of bytes in the string is equal to the argument.
|
> Major type 2: a byte string. The string's length in bytes is represented following the rules for positive integers
|
||||||
|
> (major type 0).
|
||||||
|
|
||||||
[MessagePack's documentation on the bin type
|
[MessagePack's documentation on the bin type
|
||||||
family](https://github.com/msgpack/msgpack/blob/master/spec.md#bin-format-family) describes this type as:
|
family](https://github.com/msgpack/msgpack/blob/master/spec.md#bin-format-family) describes this type as:
|
||||||
@@ -36,63 +37,26 @@ represent a byte array in modern C++.
|
|||||||
`BinaryType`
|
`BinaryType`
|
||||||
: container type to store arrays
|
: container type to store arrays
|
||||||
|
|
||||||
Although not formally expressed as a C++ concept, `BinaryType` must be default-constructible,
|
|
||||||
copy/move-constructible, and support `push_back()`, `.data()`, and `.size()`, because
|
|
||||||
[`byte_container_with_subtype`](../byte_container_with_subtype/index.md) derives directly from it. Its
|
|
||||||
`value_type` must additionally be exactly one byte wide (e.g., `std::uint8_t`/`char`/`std::byte`): the binary
|
|
||||||
serializers (CBOR, MessagePack, BSON, UBJSON) read and write the container's raw bytes via
|
|
||||||
`reinterpret_cast`, which is only correct for byte-sized elements — a container like
|
|
||||||
`#!cpp std::vector<std::intptr_t>` will not work as `BinaryType`. The elements must be stored contiguously, and
|
|
||||||
the binary readers additionally require `resize()` and `operator[]`. See
|
|
||||||
[Template Parameter Requirements](../../features/types/template_parameters.md#binarytype) for the full list.
|
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
### Default type
|
#### Default type
|
||||||
|
|
||||||
The default values for `BinaryType` is `#!cpp std::vector<std::uint8_t>`.
|
The default values for `BinaryType` is `#!cpp std::vector<std::uint8_t>`.
|
||||||
|
|
||||||
### Supported byte types
|
#### Storage
|
||||||
|
|
||||||
`#!cpp std::vector<std::uint8_t>`, `#!cpp std::vector<char>`, and `#!cpp std::vector<std::byte>` are supported.
|
|
||||||
Regardless of which of them is configured, [`dump`](dump.md) writes the bytes as the numbers 0..255.
|
|
||||||
|
|
||||||
### Custom BinaryType behavior
|
|
||||||
|
|
||||||
When a custom `BinaryType` is configured (other than the default `#!cpp std::vector<std::uint8_t>`), you can assign
|
|
||||||
values of that type directly to a `basic_json` instance, and they will automatically be recognized as binary values
|
|
||||||
rather than arrays:
|
|
||||||
|
|
||||||
```cpp
|
|
||||||
using custom_json = nlohmann::ordered_json::with_binary_t<std::vector<std::byte>>;
|
|
||||||
|
|
||||||
std::vector<std::byte> data{std::byte{1}, std::byte{2}, std::byte{3}};
|
|
||||||
custom_json j = data; // Creates a binary value, not an array
|
|
||||||
assert(j.is_binary());
|
|
||||||
|
|
||||||
// Round-tripping works seamlessly
|
|
||||||
auto extracted = j.get<std::vector<std::byte>>();
|
|
||||||
assert(extracted == data);
|
|
||||||
```
|
|
||||||
|
|
||||||
This automatic type detection is a convenience feature that only applies to custom (non-default) `BinaryType` configurations.
|
|
||||||
The default `nlohmann::json` continues to treat `#!cpp std::vector<std::uint8_t>` as arrays for backward compatibility.
|
|
||||||
|
|
||||||
### Storage
|
|
||||||
|
|
||||||
Binary Arrays are stored as pointers in a `basic_json` type. That is, for any access to array values, a pointer of the
|
Binary Arrays are stored as pointers in a `basic_json` type. That is, for any access to array values, a pointer of the
|
||||||
type `#!cpp binary_t*` must be dereferenced.
|
type `#!cpp binary_t*` must be dereferenced.
|
||||||
|
|
||||||
### Notes on subtypes
|
#### Notes on subtypes
|
||||||
|
|
||||||
- CBOR
|
- CBOR
|
||||||
- Binary values are represented as byte strings. Subtypes are written as tags.
|
- Binary values are represented as byte strings. Subtypes are written as tags.
|
||||||
|
|
||||||
- MessagePack
|
- MessagePack
|
||||||
- If a subtype is given and the binary array contains exactly 1, 2, 4, 8, or 16 elements, the fixext family (fixext1,
|
- If a subtype is given and the binary array contains exactly 1, 2, 4, 8, or 16 elements, the fixext family (fixext1,
|
||||||
fixext2, fixext4, fixext8, fixext16) is used. For other sizes, the ext family (ext8, ext16, ext32) is used. The
|
fixext2, fixext4, fixext8) is used. For other sizes, the ext family (ext8, ext16, ext32) is used. The subtype is
|
||||||
subtype is then written as the signed 8-bit ext type: subtypes 128 to 255 map to the negative (reserved) ext
|
then added as a signed 8-bit integer.
|
||||||
types, and on reading the ext type is exposed as an unsigned subtype from 0 to 255.
|
|
||||||
- If no subtype is given, the bin family (bin8, bin16, bin32) is used.
|
- If no subtype is given, the bin family (bin8, bin16, bin32) is used.
|
||||||
|
|
||||||
- BSON
|
- BSON
|
||||||
@@ -118,13 +82,8 @@ type `#!cpp binary_t*` must be dereferenced.
|
|||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [Binary values](../../features/binary_values.md) - how binary values and subtypes are handled
|
- [byte_container_with_subtype](../byte_container_with_subtype/index.md)
|
||||||
- [Binary formats](../../features/binary_formats/index.md) - formats that can store binary values
|
|
||||||
- [`byte_container_with_subtype`](../byte_container_with_subtype/index.md) - container type used by binary values
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 3.8.0. Changed the type of subtype to `std::uint64_t` in version 3.10.0.
|
- Added in version 3.8.0. Changed the type of subtype to `std::uint64_t` in version 3.10.0.
|
||||||
- Fixed [`dump`](dump.md), [`std::hash`](std_hash.md), and [`to_ubjson`](to_ubjson.md) for byte types that are not
|
|
||||||
integers (e.g., `#!cpp std::byte`) in version 3.13.0. `dump` now writes the bytes of a signed byte type (e.g.,
|
|
||||||
`#!cpp char`) as 0..255 rather than as negative numbers.
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
# <small>nlohmann::basic_json::</small>bjdata_version_t
|
|
||||||
|
|
||||||
```cpp
|
|
||||||
enum class bjdata_version_t
|
|
||||||
{
|
|
||||||
draft2,
|
|
||||||
draft3
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
This enumeration is used in [`to_bjdata`](to_bjdata.md) to choose the version of the BJData specification to write:
|
|
||||||
|
|
||||||
draft2
|
|
||||||
: BJData Draft 2 (the default). Binary values are written as arrays of `U` integers, and ND-arrays with
|
|
||||||
`"_ArrayType_": "byte"` are written as regular objects, since the `B` marker is not part of Draft 2.
|
|
||||||
|
|
||||||
draft3
|
|
||||||
: BJData Draft 3. Binary values are written as `B` elements: as an optimized binary array (`[$B#`) if both `use_size`
|
|
||||||
and `use_type` are set, and as an array of `B`-prefixed elements otherwise. ND-arrays with
|
|
||||||
`"_ArrayType_": "byte"` are written as packed arrays (`[$B#[...]`).
|
|
||||||
|
|
||||||
Only the writer is affected by the version. [`from_bjdata`](from_bjdata.md) reads the markers of both drafts.
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
??? example
|
|
||||||
|
|
||||||
The example below shows how the different values of the `bjdata_version_t` influence the serialization of a binary
|
|
||||||
value with [`to_bjdata`](to_bjdata.md).
|
|
||||||
|
|
||||||
```cpp
|
|
||||||
--8<-- "examples/bjdata_version_t.cpp"
|
|
||||||
```
|
|
||||||
|
|
||||||
Output:
|
|
||||||
|
|
||||||
```json
|
|
||||||
--8<-- "examples/bjdata_version_t.output"
|
|
||||||
```
|
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [to_bjdata](to_bjdata.md) serializes a JSON value to BJData
|
|
||||||
- [BJData](../../features/binary_formats/bjdata.md) - the article on the BJData format
|
|
||||||
|
|
||||||
## Version history
|
|
||||||
|
|
||||||
- Added in version 3.12.0.
|
|
||||||
@@ -9,23 +9,15 @@ The type used to store JSON booleans.
|
|||||||
[RFC 8259](https://tools.ietf.org/html/rfc8259) implicitly describes a boolean as a type which differentiates the two
|
[RFC 8259](https://tools.ietf.org/html/rfc8259) implicitly describes a boolean as a type which differentiates the two
|
||||||
literals `#!json true` and `#!json false`.
|
literals `#!json true` and `#!json false`.
|
||||||
|
|
||||||
To store boolean values in C++, a type is defined by the template parameter `BooleanType` which chooses the type to use.
|
To store objects in C++, a type is defined by the template parameter `BooleanType` which chooses the type to use.
|
||||||
|
|
||||||
## Template parameters
|
|
||||||
|
|
||||||
`BooleanType`
|
|
||||||
: the type to store booleans. As it is stored directly inside a `basic_json` value (in a union), it must be a
|
|
||||||
trivially default-constructible, trivially copyable, and trivially destructible type that is convertible to and
|
|
||||||
from `#!cpp bool`. See
|
|
||||||
[Template Parameter Requirements](../../features/types/template_parameters.md#booleantype).
|
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
### Default type
|
#### Default type
|
||||||
|
|
||||||
With the default values for `BooleanType` (`#!cpp bool`), the default type for `boolean_t` is `#!cpp bool`.
|
With the default values for `BooleanType` (`#!cpp bool`), the default value for `boolean_t` is `#!cpp bool`.
|
||||||
|
|
||||||
### Storage
|
#### Storage
|
||||||
|
|
||||||
Boolean values are stored directly inside a `basic_json` type.
|
Boolean values are stored directly inside a `basic_json` type.
|
||||||
|
|
||||||
@@ -45,12 +37,6 @@ Boolean values are stored directly inside a `basic_json` type.
|
|||||||
--8<-- "examples/boolean_t.output"
|
--8<-- "examples/boolean_t.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`is_boolean`](is_boolean.md) - checks whether the JSON value is a boolean
|
|
||||||
- [Types](../../features/types/index.md) - how booleans are stored
|
|
||||||
- [Template Parameter Requirements](../../features/types/template_parameters.md) - requirements on the `BooleanType` template parameter
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 1.0.0.
|
- Added in version 1.0.0.
|
||||||
@@ -6,12 +6,7 @@ const_iterator cbegin() const noexcept;
|
|||||||
|
|
||||||
Returns an iterator to the first element.
|
Returns an iterator to the first element.
|
||||||
|
|
||||||
<div class="nj-fig-wrap" markdown>
|

|
||||||
--8<-- "images/range-begin-end.svg"
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="nj-caption" markdown>`cbegin()` points to the first element, like `begin()`, and `end()` to the position after
|
|
||||||
the last element; the dashed cell is the past-the-last position, which must not be dereferenced.</p>
|
|
||||||
|
|
||||||
## Return value
|
## Return value
|
||||||
|
|
||||||
@@ -41,14 +36,6 @@ Constant.
|
|||||||
--8<-- "examples/cbegin.output"
|
--8<-- "examples/cbegin.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`begin`](begin.md) - returns an iterator to the first element
|
|
||||||
- [`cend`](cend.md) - returns a const iterator to one past the last element
|
|
||||||
- [`crbegin`](crbegin.md) - returns a const reverse iterator to the last element
|
|
||||||
- [Iterators](../../features/iterators.md) - the article on iterators
|
|
||||||
- [`basic_json_view::cbegin`](../basic_json_view/cbegin.md) - the same iteration on a zero-copy view
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 1.0.0.
|
- Added in version 1.0.0.
|
||||||
@@ -9,19 +9,16 @@ enum class cbor_tag_handler_t
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
This enumeration is used in [`from_cbor`](from_cbor.md) and [`sax_parse`](sax_parse.md) to choose how to treat tags:
|
This enumeration is used in the [`from_cbor`](from_cbor.md) function to choose how to treat tags:
|
||||||
|
|
||||||
error
|
error
|
||||||
: report a parse error in case of a tag (the `from_cbor` overloads throw a `parse_error` exception by default)
|
: throw a `parse_error` exception in case of a tag
|
||||||
|
|
||||||
ignore
|
ignore
|
||||||
: ignore tags (also in front of a text string map key)
|
: ignore tags
|
||||||
|
|
||||||
store
|
store
|
||||||
: store tagged byte strings (for bytes 0xd8..0xdb) as binary values with the tag as subtype; other tagged values are
|
: store tagged values as binary container with subtype (for bytes 0xd8..0xdb)
|
||||||
read as if the tag were ignored. If several tags precede a byte string, only the tag directly in front of it is
|
|
||||||
stored, and only when it has the form 0xd8..0xdb (a tag 0..23 written as 0xc0..0xd7 is skipped). Tags in front of a
|
|
||||||
text string map key are skipped.
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
@@ -40,13 +37,6 @@ store
|
|||||||
--8<-- "examples/cbor_tag_handler_t.output"
|
--8<-- "examples/cbor_tag_handler_t.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [Binary values](../../features/binary_values.md) - how binary values and subtypes are handled
|
|
||||||
- [`from_cbor`](from_cbor.md) - deserializes a JSON value from CBOR
|
|
||||||
- [`input_format_t`](input_format_t.md) - the enumeration of supported input formats
|
|
||||||
- [CBOR](../../features/binary_formats/cbor.md) - the article on the CBOR format
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 3.9.0. Added value `store` in 3.10.0.
|
- Added in version 3.9.0. Added value `store` in 3.10.0.
|
||||||
@@ -6,12 +6,7 @@ const_iterator cend() const noexcept;
|
|||||||
|
|
||||||
Returns an iterator to one past the last element.
|
Returns an iterator to one past the last element.
|
||||||
|
|
||||||
<div class="nj-fig-wrap" markdown>
|

|
||||||
--8<-- "images/range-begin-end.svg"
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="nj-caption" markdown>`cend()` points to the position after the last element, like `end()`, and `begin()` to
|
|
||||||
the first element; the dashed cell is the past-the-last position, which must not be dereferenced.</p>
|
|
||||||
|
|
||||||
## Return value
|
## Return value
|
||||||
|
|
||||||
@@ -41,14 +36,6 @@ Constant.
|
|||||||
--8<-- "examples/cend.output"
|
--8<-- "examples/cend.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`end`](end.md) - returns an iterator to one past the last element
|
|
||||||
- [`cbegin`](cbegin.md) - returns a const iterator to the first element
|
|
||||||
- [`crend`](crend.md) - returns a const reverse iterator to one before the first element
|
|
||||||
- [Iterators](../../features/iterators.md) - the article on iterators
|
|
||||||
- [`basic_json_view::cend`](../basic_json_view/cend.md) - the same iteration on a zero-copy view
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 1.0.0.
|
- Added in version 1.0.0.
|
||||||
@@ -7,15 +7,15 @@ void clear() noexcept;
|
|||||||
Clears the content of a JSON value and resets it to the default value as if [`basic_json(value_t)`](basic_json.md) would
|
Clears the content of a JSON value and resets it to the default value as if [`basic_json(value_t)`](basic_json.md) would
|
||||||
have been called with the current value type from [`type()`](type.md):
|
have been called with the current value type from [`type()`](type.md):
|
||||||
|
|
||||||
| Value type | initial value |
|
| Value type | initial value |
|
||||||
|------------|-----------------------------------------|
|
|------------|----------------------|
|
||||||
| null | `null` |
|
| null | `null` |
|
||||||
| boolean | `false` |
|
| boolean | `false` |
|
||||||
| string | `""` |
|
| string | `""` |
|
||||||
| number | `0` |
|
| number | `0` |
|
||||||
| binary | An empty byte vector with no subtype |
|
| binary | An empty byte vector |
|
||||||
| object | `{}` |
|
| object | `{}` |
|
||||||
| array | `[]` |
|
| array | `[]` |
|
||||||
|
|
||||||
Has the same effect as calling
|
Has the same effect as calling
|
||||||
|
|
||||||
@@ -52,14 +52,7 @@ All iterators, pointers, and references related to this container are invalidate
|
|||||||
--8<-- "examples/clear.output"
|
--8<-- "examples/clear.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`erase`](erase.md) - removes elements from a JSON value
|
|
||||||
- [`empty`](empty.md) - checks whether the JSON value has no elements
|
|
||||||
- [Modifying values](../../features/modifying_values.md) - the article on modifying values
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 1.0.0.
|
- Added in version 1.0.0.
|
||||||
- Added support for binary types in version 3.8.0.
|
- Added support for binary types in version 3.8.0.
|
||||||
- Fixed in version 3.13.0 to also clear the subtype of a binary value; before, the subtype was left unchanged.
|
|
||||||
@@ -10,10 +10,6 @@ bool contains(KeyType&& key) const;
|
|||||||
|
|
||||||
// (3)
|
// (3)
|
||||||
bool contains(const json_pointer& ptr) const;
|
bool contains(const json_pointer& ptr) const;
|
||||||
|
|
||||||
// (4)
|
|
||||||
template<typename T>
|
|
||||||
bool contains(T) const = delete;
|
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Check whether an element exists in a JSON object with a key equivalent to `key`. If the element is not found or the
|
1. Check whether an element exists in a JSON object with a key equivalent to `key`. If the element is not found or the
|
||||||
@@ -21,9 +17,6 @@ bool contains(T) const = delete;
|
|||||||
2. See 1. This overload is only available if `KeyType` is comparable with `#!cpp typename object_t::key_type` and
|
2. See 1. This overload is only available if `KeyType` is comparable with `#!cpp typename object_t::key_type` and
|
||||||
`#!cpp typename object_comparator_t::is_transparent` denotes a type.
|
`#!cpp typename object_comparator_t::is_transparent` denotes a type.
|
||||||
3. Check whether the given JSON pointer `ptr` can be resolved in the current JSON value.
|
3. Check whether the given JSON pointer `ptr` can be resolved in the current JSON value.
|
||||||
4. Deleted: this overload is only available if `T` is an integral type and is declared as deleted, so that a call with
|
|
||||||
an integer `key` (for example, `#!cpp j.contains(0)`) fails to compile. Otherwise, the integer literal `0` would convert to
|
|
||||||
a null `#!cpp const char*` and, from there, to the key type, causing undefined behavior at runtime.
|
|
||||||
|
|
||||||
## Template parameters
|
## Template parameters
|
||||||
|
|
||||||
@@ -46,7 +39,6 @@ bool contains(T) const = delete;
|
|||||||
is not an object, `#!cpp false` is returned.
|
is not an object, `#!cpp false` is returned.
|
||||||
2. See 1.
|
2. See 1.
|
||||||
3. `#!cpp true` if the JSON pointer can be resolved to a stored value, `#!cpp false` otherwise.
|
3. `#!cpp true` if the JSON pointer can be resolved to a stored value, `#!cpp false` otherwise.
|
||||||
4. Deleted; a call with an integral argument does not compile.
|
|
||||||
|
|
||||||
## Exception safety
|
## Exception safety
|
||||||
|
|
||||||
@@ -56,45 +48,25 @@ Strong exception safety: if an exception occurs, the original value stays intact
|
|||||||
|
|
||||||
1. The function does not throw exceptions.
|
1. The function does not throw exceptions.
|
||||||
2. The function does not throw exceptions.
|
2. The function does not throw exceptions.
|
||||||
3. The function does not throw exceptions.
|
3. The function can throw the following exceptions:
|
||||||
4. Deleted; a call with an integral argument does not compile.
|
- Throws [`parse_error.106`](../../home/exceptions.md#jsonexceptionparse_error106) if an array index begins with
|
||||||
|
`0`.
|
||||||
|
- Throws [`parse_error.109`](../../home/exceptions.md#jsonexceptionparse_error109) if an array index was not a
|
||||||
|
number.
|
||||||
|
|
||||||
## Complexity
|
## Complexity
|
||||||
|
|
||||||
1. Logarithmic in the size of the JSON object.
|
Logarithmic in the size of the JSON object.
|
||||||
2. Logarithmic in the size of the JSON object.
|
|
||||||
3. At most one lookup per reference token of `ptr`, each logarithmic in the size of the container at that level:
|
|
||||||
O(*n* log *m*) for *n* reference tokens and containers of size at most *m*.
|
|
||||||
4. Deleted; a call with an integral argument does not compile.
|
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
- Overloads (1) and (2) always return `#!cpp false` when executed on a JSON type that is not an object. Overload (3)
|
- This method always returns `#!cpp false` when executed on a JSON type that is not an object.
|
||||||
also works on arrays and on primitive values: the empty JSON pointer resolves in every JSON value (so
|
|
||||||
`#!cpp json(1).contains(""_json_pointer)` returns `#!cpp true`), and `#!cpp json({1, 2}).contains("/1"_json_pointer)`
|
|
||||||
returns `#!cpp true`.
|
|
||||||
- This method can be executed on any JSON value type.
|
- This method can be executed on any JSON value type.
|
||||||
- Calling this function with an integer argument (for example, `#!cpp contains(0)`) does not compile: such an argument
|
|
||||||
would otherwise implicitly convert to a null `#!cpp const char*` and, from there, cause undefined behavior when
|
|
||||||
constructing a `#!cpp std::string` for the object key. To check for an array element instead, use [`at`](at.md),
|
|
||||||
[`operator[]`](operator%5B%5D.md), or compare against [`size`](size.md).
|
|
||||||
|
|
||||||
!!! info "Postconditions"
|
!!! info "Postconditions"
|
||||||
|
|
||||||
If `#!cpp j.contains(x)` returns `#!c true` for a key or JSON pointer `x`, then it is safe to call `j[x]`.
|
If `#!cpp j.contains(x)` returns `#!c true` for a key or JSON pointer `x`, then it is safe to call `j[x]`.
|
||||||
|
|
||||||
!!! warning "Deprecation"
|
|
||||||
|
|
||||||
Overload (3) also accepts a [`json_pointer`](../json_pointer/index.md) whose template argument is a `basic_json`
|
|
||||||
specialization (e.g., `nlohmann::json_pointer<nlohmann::json>`) instead of a string type. This is deprecated since
|
|
||||||
version 3.11.0 and will be removed in a future major version; use `basic_json::json_pointer` (for `json`,
|
|
||||||
`nlohmann::json_pointer<std::string>`) instead.
|
|
||||||
|
|
||||||
You should be warned by your compiler with a `-Wdeprecated-declarations` warning if you are using a deprecated
|
|
||||||
function.
|
|
||||||
|
|
||||||
See the [migration guide](../../integration/migration_guide.md#json-pointers) for how to update existing code.
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
??? example "Example: (1) check with key"
|
??? example "Example: (1) check with key"
|
||||||
@@ -139,18 +111,8 @@ Strong exception safety: if an exception occurs, the original value stays intact
|
|||||||
--8<-- "examples/contains__json_pointer.output"
|
--8<-- "examples/contains__json_pointer.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`find`](find.md) - find a value in an object
|
|
||||||
- [`count`](count.md) - returns the number of occurrences of a key
|
|
||||||
- [`basic_json_view::contains`](../basic_json_view/contains.md) - the same check on a zero-copy view
|
|
||||||
- [Element Access](../../features/element_access/index.md#does-this-key-exist) - how to test whether a key exists
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
1. Added in version 3.11.0.
|
1. Added in version 3.11.0.
|
||||||
2. Added in version 3.6.0. Extended template `KeyType` to support comparable types in version 3.11.0. Support for keys
|
2. Added in version 3.6.0. Extended template `KeyType` to support comparable types in version 3.11.0.
|
||||||
convertible to `std::string_view` added in version 3.13.0, consistently across the lookup functions.
|
|
||||||
3. Added in version 3.7.0.
|
3. Added in version 3.7.0.
|
||||||
4. Deleted overloads for integral key types added in version 3.13.0 to reject such calls at compile time instead of
|
|
||||||
causing undefined behavior at runtime.
|
|
||||||
@@ -7,19 +7,12 @@ size_type count(const typename object_t::key_type& key) const;
|
|||||||
// (2)
|
// (2)
|
||||||
template<typename KeyType>
|
template<typename KeyType>
|
||||||
size_type count(KeyType&& key) const;
|
size_type count(KeyType&& key) const;
|
||||||
|
|
||||||
// (3)
|
|
||||||
template<typename T>
|
|
||||||
size_type count(T) const = delete;
|
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Returns the number of elements with key `key`. If `ObjectType` is the default `std::map` type, the return value will
|
1. Returns the number of elements with key `key`. If `ObjectType` is the default `std::map` type, the return value will
|
||||||
always be `0` (`key` was not found) or `1` (`key` was found).
|
always be `0` (`key` was not found) or `1` (`key` was found).
|
||||||
2. See 1. This overload is only available if `KeyType` is comparable with `#!cpp typename object_t::key_type` and
|
2. See 1. This overload is only available if `KeyType` is comparable with `#!cpp typename object_t::key_type` and
|
||||||
`#!cpp typename object_comparator_t::is_transparent` denotes a type.
|
`#!cpp typename object_comparator_t::is_transparent` denotes a type.
|
||||||
3. Deleted: this overload is only available if `T` is an integral type and is declared as deleted, so that a call with
|
|
||||||
an integer `key` (for example, `#!cpp j.count(0)`) fails to compile. Otherwise, the integer literal `0` would convert to
|
|
||||||
a null `#!cpp const char*` and, from there, to the key type, causing undefined behavior at runtime.
|
|
||||||
|
|
||||||
## Template parameters
|
## Template parameters
|
||||||
|
|
||||||
@@ -47,11 +40,7 @@ Logarithmic in the size of the JSON object.
|
|||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
- This method always returns `0` when executed on a JSON type that is not an object.
|
This method always returns `0` when executed on a JSON type that is not an object.
|
||||||
- Calling this function with an integer argument (for example, `#!cpp count(0)`) does not compile: such an argument
|
|
||||||
would otherwise implicitly convert to a null `#!cpp const char*` and, from there, cause undefined behavior when
|
|
||||||
constructing a `#!cpp std::string` for the object key. To check for an array element instead, use [`at`](at.md),
|
|
||||||
[`operator[]`](operator%5B%5D.md), or compare against [`size`](size.md).
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
@@ -83,17 +72,7 @@ Logarithmic in the size of the JSON object.
|
|||||||
--8<-- "examples/count__keytype.c++17.output"
|
--8<-- "examples/count__keytype.c++17.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`find`](find.md) - find a value in an object
|
|
||||||
- [`contains`](contains.md) - checks whether a key exists
|
|
||||||
- [`basic_json_view::count`](../basic_json_view/count.md) - the same check on a zero-copy view
|
|
||||||
- [Element Access](../../features/element_access/index.md#does-this-key-exist) - how to test whether a key exists
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
1. Added in version 3.11.0.
|
1. Added in version 3.11.0.
|
||||||
2. Added in version 1.0.0. Changed to support comparable key types in version 3.11.0. Support for keys convertible to
|
2. Added in version 1.0.0. Changed parameter `key` type to `KeyType&&` in version 3.11.0.
|
||||||
`std::string_view` added in version 3.13.0, consistently across the lookup functions.
|
|
||||||
3. Deleted overload for integral key types added in version 3.13.0 to reject such calls at compile time instead of
|
|
||||||
causing undefined behavior at runtime.
|
|
||||||
@@ -6,17 +6,11 @@ const_reverse_iterator crbegin() const noexcept;
|
|||||||
|
|
||||||
Returns an iterator to the reverse-beginning; that is, the last element.
|
Returns an iterator to the reverse-beginning; that is, the last element.
|
||||||
|
|
||||||
<div class="nj-fig-wrap" markdown>
|

|
||||||
--8<-- "images/range-rbegin-rend.svg"
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="nj-caption" markdown>`crbegin()` points to the last element, like `rbegin()`, and `rend()` to the position
|
|
||||||
before the first element. The upper row is the reversed sequence and the lower row the forward sequence; dashed arrows
|
|
||||||
link each reverse iterator to the forward iterator it stores, and dashed cells are past-the-last positions.</p>
|
|
||||||
|
|
||||||
## Return value
|
## Return value
|
||||||
|
|
||||||
reverse iterator to the last element
|
reverse iterator to the first element
|
||||||
|
|
||||||
## Exception safety
|
## Exception safety
|
||||||
|
|
||||||
@@ -42,13 +36,6 @@ Constant.
|
|||||||
--8<-- "examples/crbegin.output"
|
--8<-- "examples/crbegin.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`crend`](crend.md) - returns a const reverse iterator to one before the first element
|
|
||||||
- [`rbegin`](rbegin.md) - returns a reverse iterator to the last element
|
|
||||||
- [`cbegin`](cbegin.md) - returns a const iterator to the first element
|
|
||||||
- [Iterators](../../features/iterators.md) - the article on iterators
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 1.0.0.
|
- Added in version 1.0.0.
|
||||||
@@ -7,13 +7,7 @@ const_reverse_iterator crend() const noexcept;
|
|||||||
Returns an iterator to the reverse-end; that is, one before the first element. This element acts as a placeholder,
|
Returns an iterator to the reverse-end; that is, one before the first element. This element acts as a placeholder,
|
||||||
attempting to access it results in undefined behavior.
|
attempting to access it results in undefined behavior.
|
||||||
|
|
||||||
<div class="nj-fig-wrap" markdown>
|

|
||||||
--8<-- "images/range-rbegin-rend.svg"
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="nj-caption" markdown>`crend()` points to the position before the first element, like `rend()`, and `rbegin()`
|
|
||||||
to the last element. The upper row is the reversed sequence and the lower row the forward sequence; dashed arrows link
|
|
||||||
each reverse iterator to the forward iterator it stores, and dashed cells are past-the-last positions.</p>
|
|
||||||
|
|
||||||
## Return value
|
## Return value
|
||||||
|
|
||||||
@@ -31,7 +25,7 @@ Constant.
|
|||||||
|
|
||||||
??? example
|
??? example
|
||||||
|
|
||||||
The following code shows an example for `crend()`.
|
The following code shows an example for `eend()`.
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
--8<-- "examples/crend.cpp"
|
--8<-- "examples/crend.cpp"
|
||||||
@@ -43,13 +37,6 @@ Constant.
|
|||||||
--8<-- "examples/crend.output"
|
--8<-- "examples/crend.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`crbegin`](crbegin.md) - returns a const reverse iterator to the last element
|
|
||||||
- [`rend`](rend.md) - returns a reverse iterator to one before the first element
|
|
||||||
- [`cend`](cend.md) - returns a const iterator to one past the last element
|
|
||||||
- [Iterators](../../features/iterators.md) - the article on iterators
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 1.0.0.
|
- Added in version 1.0.0.
|
||||||
@@ -30,13 +30,6 @@ The actual comparator used depends on [`object_t`](object_t.md) and can be obtai
|
|||||||
--8<-- "examples/default_object_comparator_t.output"
|
--8<-- "examples/default_object_comparator_t.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`object_comparator_t`](object_comparator_t.md) - the comparator actually used by `object_t`
|
|
||||||
- [`object_t`](object_t.md) - the type used to store JSON objects
|
|
||||||
- [Template Parameter Requirements](../../features/types/template_parameters.md) - requirements on the `ObjectType` template parameter
|
|
||||||
- [Object order](../../features/object_order.md) - preserve the insertion order of keys
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 3.11.0.
|
- Added in version 3.11.0.
|
||||||
@@ -2,28 +2,17 @@
|
|||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
static basic_json diff(const basic_json& source,
|
static basic_json diff(const basic_json& source,
|
||||||
const basic_json& target,
|
const basic_json& target);
|
||||||
const string_t& path = "");
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Creates a [JSON Patch](http://jsonpatch.com) so that value `source` can be changed into the value `target` by calling
|
Creates a [JSON Patch](http://jsonpatch.com) so that value `source` can be changed into the value `target` by calling
|
||||||
[`patch`](patch.md) function.
|
[`patch`](patch.md) function.
|
||||||
|
|
||||||
For two JSON values `source` and `target`, the following code yields `#!cpp true`:
|
For two JSON values `source` and `target`, the following code yields always `#!cpp true`:
|
||||||
```cpp
|
```cpp
|
||||||
source.patch(diff(source, target)) == target;
|
source.patch(diff(source, target)) == target;
|
||||||
```
|
```
|
||||||
|
|
||||||
The equality holds up to [`operator==`](operator_eq.md), so it has the following exceptions:
|
|
||||||
|
|
||||||
- A value that is not equal to itself cannot round-trip. This applies to `NaN` (also nested in an array or object) and
|
|
||||||
to [discarded](is_discarded.md) values: `diff` emits a `replace` operation for them. A `NaN` in the patch is
|
|
||||||
serialized as `#!json null`, so a patch that was dumped and parsed again would set `#!json null`.
|
|
||||||
- Numbers that compare equal produce no operation, even if their types differ or if one is zero and the other is
|
|
||||||
negative zero: `diff(1, 1.0)` (integer and floating-point), `diff(1u, 1)` (unsigned and signed integer) and
|
|
||||||
`diff(0.0, -0.0)` (positive and negative zero) all return `#!json []`. The patched value is then the `source` and
|
|
||||||
keeps its number type and sign.
|
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
`source` (in)
|
`source` (in)
|
||||||
@@ -32,48 +21,21 @@ The equality holds up to [`operator==`](operator_eq.md), so it has the following
|
|||||||
`target` (in)
|
`target` (in)
|
||||||
: JSON value to compare against
|
: JSON value to compare against
|
||||||
|
|
||||||
`path` (in)
|
|
||||||
: a prefix that is put verbatim in front of the `path` member of every operation (default: `""`, which addresses the
|
|
||||||
root of the value). The prefix is neither escaped nor validated: `#!cpp diff(1, 2, "abc")` yields an operation with
|
|
||||||
the `path` `abc`, which is not a valid JSON Pointer. Use it with a valid JSON Pointer such as `/root` and escape
|
|
||||||
`~` and `/` in its reference tokens (see [JSON Pointer](../../features/json_pointer.md)).
|
|
||||||
|
|
||||||
## Return value
|
## Return value
|
||||||
|
|
||||||
a JSON patch to convert the `source` to `target`
|
a JSON patch to convert the `source` to `target`
|
||||||
|
|
||||||
## Exception safety
|
## Exception safety
|
||||||
|
|
||||||
Strong guarantee: `source` and `target` are never modified.
|
Strong guarantee: if an exception is thrown, there are no changes in the JSON value.
|
||||||
|
|
||||||
## Complexity
|
## Complexity
|
||||||
|
|
||||||
Linear in the total number of values (including nested ones) in `source` and `target`, times the cost of a key-based
|
Linear in the lengths of `source` and `target`.
|
||||||
object operation (looking up a key in an object): logarithmic for [`json`](../json.md), and linear for
|
|
||||||
[`ordered_json`](../ordered_json.md) (see [`ordered_map` complexity](../ordered_map.md#complexity)). For
|
|
||||||
`ordered_json`, diffing two objects with `n` and `m` members therefore takes O((n+m)²) when their keys do not line up
|
|
||||||
(e.g., a key was added or the keys are in a different order). The size of the patch is proportional to the number of
|
|
||||||
operations times the length of their paths, so a small change deep inside a value yields a long `path`.
|
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
- Currently, only `remove`, `add`, and `replace` operations are generated.
|
Currently, only `remove`, `add`, and `replace` operations are generated.
|
||||||
- The patch is correct, but not guaranteed to be minimal. For instance, `diff([1,2,3], [0,1,2,3])` yields three
|
|
||||||
`replace` operations and one `add` operation instead of a single insertion.
|
|
||||||
- Differences between two arrays are reported index by index. Elements that were added at the end of the array are added
|
|
||||||
with `add` operations on the path `/-` (appended in order), and elements that were removed are removed with `remove`
|
|
||||||
operations from the highest index down to the lowest, so that the remaining indices stay valid.
|
|
||||||
- For objects, the operations for the members of `source` come first (`replace`, `remove`, or the operations for nested
|
|
||||||
values, in the iteration order of `source`), followed by `add` operations for the members that only `target` has.
|
|
||||||
- For [`ordered_json`](../ordered_json.md), objects with the same keys in a different order are different. As a patch
|
|
||||||
cannot reorder members, `diff` removes all keys of the `source` object and adds them again in the order of the
|
|
||||||
`target`.
|
|
||||||
- If `source` and `target` differ as a whole (e.g., different types), the patch consists of a single `replace`
|
|
||||||
operation for the root of the value, i.e., with the `path` `""` (or the given `path` prefix).
|
|
||||||
- The `value` members of the patch hold copies of values of `target`. A [binary](../../features/binary_values.md) value
|
|
||||||
has no JSON representation: when a patch that contains one is serialized, it becomes an object such as
|
|
||||||
`#!json {"bytes":[1,3],"subtype":null}`, so a parsed patch no longer holds a binary value (and would set that object
|
|
||||||
instead).
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
@@ -93,12 +55,7 @@ operations times the length of their paths, so a small change deep inside a valu
|
|||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902) - specification of JSON Patch
|
- [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902)
|
||||||
- [`patch`](patch.md) - applies a JSON Patch
|
|
||||||
- [`patch_inplace`](patch_inplace.md) - applies a JSON Patch in place
|
|
||||||
- [`merge_patch`](merge_patch.md) - applies a JSON Merge Patch
|
|
||||||
- [`merge_diff`](merge_diff.md) - creates a diff as a JSON Merge Patch
|
|
||||||
- [JSON Patch and Diff](../../features/json_patch.md) - the article on JSON Patch
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
|
|||||||
@@ -25,12 +25,10 @@ and `ensure_ascii` parameters.
|
|||||||
result consists of ASCII characters only.
|
result consists of ASCII characters only.
|
||||||
|
|
||||||
`error_handler` (in)
|
`error_handler` (in)
|
||||||
: how to react on decoding errors; there are four possible values (see [`error_handler_t`](error_handler_t.md):
|
: how to react on decoding errors; there are three possible values (see [`error_handler_t`](error_handler_t.md):
|
||||||
`strict` (throws an exception in case a decoding error occurs; default), `replace` (replace invalid UTF-8 sequences
|
`strict` (throws and exception in case a decoding error occurs; default), `replace` (replace invalid UTF-8 sequences
|
||||||
with U+FFFD), `ignore` (ignore invalid UTF-8 sequences during serialization; all valid bytes are copied to the
|
with U+FFFD), and `ignore` (ignore invalid UTF-8 sequences during serialization; all bytes are copied to the output
|
||||||
output unchanged, and invalid bytes are dropped), and `keep` (write the ill-formed bytes to the output as is,
|
unchanged)).
|
||||||
without escaping them, even if `ensure_ascii` is `#!cpp true`; the result is then not valid UTF-8, but equals the
|
|
||||||
input bytes exactly, and well-formed characters around the ill-formed bytes are still escaped as usual)).
|
|
||||||
|
|
||||||
## Return value
|
## Return value
|
||||||
|
|
||||||
@@ -45,26 +43,12 @@ Strong guarantee: if an exception is thrown, there are no changes to any JSON va
|
|||||||
Throws [`type_error.316`](../../home/exceptions.md#jsonexceptiontype_error316) if a string stored inside the JSON value
|
Throws [`type_error.316`](../../home/exceptions.md#jsonexceptiontype_error316) if a string stored inside the JSON value
|
||||||
is not UTF-8 encoded and `error_handler` is set to `strict`
|
is not UTF-8 encoded and `error_handler` is set to `strict`
|
||||||
|
|
||||||
!!! warning "Serializing untrusted input"
|
|
||||||
|
|
||||||
When serializing values that may contain invalid or untrusted UTF-8 (e.g., bytes taken directly from network
|
|
||||||
input), `dump()` throws [`type_error.316`](../../home/exceptions.md#jsonexceptiontype_error316) in the default
|
|
||||||
`strict` mode. To serialize such data without throwing, pass
|
|
||||||
[`error_handler_t::replace`](error_handler_t.md) (substitutes U+FFFD) or
|
|
||||||
[`error_handler_t::ignore`](error_handler_t.md). Callers that serialize untrusted input on a crash-sensitive path
|
|
||||||
should either choose a non-strict error handler or wrap `dump()` in a `#!cpp try`/`#!cpp catch`.
|
|
||||||
|
|
||||||
See the [FAQ](../../home/faq.md#serializing-untrusted-or-invalid-utf-8) for details.
|
|
||||||
|
|
||||||
## Complexity
|
## Complexity
|
||||||
|
|
||||||
Linear.
|
Linear.
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
Floating-point numbers are written with the fewest digits that read back as the same value (for `#!cpp double`; see
|
|
||||||
[number handling](../../features/types/number_handling.md#number-serialization)).
|
|
||||||
|
|
||||||
Binary values are serialized as an object containing two keys:
|
Binary values are serialized as an object containing two keys:
|
||||||
|
|
||||||
- "bytes": an array of bytes as integers
|
- "bytes": an array of bytes as integers
|
||||||
@@ -87,20 +71,9 @@ Binary values are serialized as an object containing two keys:
|
|||||||
--8<-- "examples/dump.output"
|
--8<-- "examples/dump.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`to_string`](to_string.md) - returns a string representation of a JSON value
|
|
||||||
- [`operator<<`](../operator_ltlt.md) - serialize to stream
|
|
||||||
- [`basic_json_view::dump`](../basic_json_view/dump.md) - the corresponding function of `basic_json_view`, serializing
|
|
||||||
directly from a flat index without building a `basic_json` value
|
|
||||||
- [Serialization](../../features/serialization.md) - the serialization article
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 1.0.0.
|
- Added in version 1.0.0.
|
||||||
- Indentation character `indent_char`, option `ensure_ascii` and exceptions added in version 3.0.0.
|
- Indentation character `indent_char`, option `ensure_ascii` and exceptions added in version 3.0.0.
|
||||||
- Error handlers added in version 3.4.0.
|
- Error handlers added in version 3.4.0.
|
||||||
- Serialization of binary values added in version 3.8.0.
|
- Serialization of binary values added in version 3.8.0.
|
||||||
- Error handler `keep` added in version 3.13.0.
|
|
||||||
- Doubles are written with the shortest digits (Żmij instead of Grisu2) since version 3.13.0; about 0.1% of doubles are
|
|
||||||
written differently, most of them with fewer digits.
|
|
||||||
@@ -29,11 +29,6 @@ iterators (including the `end()` iterator) and all references to the elements ar
|
|||||||
a pair consisting of an iterator to the inserted element, or the already-existing element if no insertion happened, and
|
a pair consisting of an iterator to the inserted element, or the already-existing element if no insertion happened, and
|
||||||
a `#!cpp bool` denoting whether the insertion took place.
|
a `#!cpp bool` denoting whether the insertion took place.
|
||||||
|
|
||||||
## Exception safety
|
|
||||||
|
|
||||||
Strong guarantee: if an exception is thrown, there are no changes to any JSON value. As an exception, a `#!json null`
|
|
||||||
value is converted to an empty object before the element is added and keeps that type if adding the element throws.
|
|
||||||
|
|
||||||
## Exceptions
|
## Exceptions
|
||||||
|
|
||||||
Throws [`type_error.311`](../../home/exceptions.md#jsonexceptiontype_error311) when called on a type other than JSON
|
Throws [`type_error.311`](../../home/exceptions.md#jsonexceptiontype_error311) when called on a type other than JSON
|
||||||
@@ -61,14 +56,6 @@ Logarithmic in the size of the container, O(log(`size()`)).
|
|||||||
--8<-- "examples/emplace.output"
|
--8<-- "examples/emplace.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`emplace_back`](emplace_back.md) - add a value to an array
|
|
||||||
- [`insert`](insert.md) - add values to an array/object
|
|
||||||
- [Modifying values](../../features/modifying_values.md) - the article on modifying values
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 2.0.8.
|
- Since version 2.0.8.
|
||||||
- Fixed in version 3.13.0: for [`ordered_json`](../ordered_json.md), the value could previously only be passed as an
|
|
||||||
rvalue; it can now also be passed as an lvalue or a `#!cpp const` lvalue, matching the behavior of `json`.
|
|
||||||
@@ -28,11 +28,6 @@ iterator is invalidated.
|
|||||||
|
|
||||||
reference to the inserted element
|
reference to the inserted element
|
||||||
|
|
||||||
## Exception safety
|
|
||||||
|
|
||||||
Strong guarantee: if an exception is thrown, there are no changes to any JSON value. As an exception, a `#!json null`
|
|
||||||
value is converted to an empty array before the element is added and keeps that type if adding the element throws.
|
|
||||||
|
|
||||||
## Exceptions
|
## Exceptions
|
||||||
|
|
||||||
Throws [`type_error.311`](../../home/exceptions.md#jsonexceptiontype_error311) when called on a type other than JSON
|
Throws [`type_error.311`](../../home/exceptions.md#jsonexceptiontype_error311) when called on a type other than JSON
|
||||||
@@ -61,11 +56,10 @@ Amortized constant.
|
|||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [`operator+=`](operator+=.md) - add a value to an array/object
|
- [operator+=](operator+=.md) add a value to an array/object
|
||||||
- [`push_back`](push_back.md) - add a value to an array/object
|
- [push_back](push_back.md) add a value to an array/object
|
||||||
- [Modifying values](../../features/modifying_values.md) - the article on modifying values
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 2.0.8.
|
- Since version 2.0.8.
|
||||||
- Returns reference since 3.7.0.
|
- Returns reference since 3.7.0.
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
bool empty() const noexcept;
|
bool empty() const noexcept;
|
||||||
```
|
```
|
||||||
|
|
||||||
Checks if a JSON value has no elements (i.e., whether its [`size()`](size.md) is `0`).
|
Checks if a JSON value has no elements (i.e. whether its [`size()`](size.md) is `0`).
|
||||||
|
|
||||||
## Return value
|
## Return value
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ bool empty() const noexcept
|
|||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
This function does not return whether a string stored as JSON value is empty — it returns whether the JSON container
|
This function does not return whether a string stored as JSON value is empty -- it returns whether the JSON container
|
||||||
itself is empty which is `#!cpp false` in the case of a string.
|
itself is empty which is `#!cpp false` in the case of a string.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
@@ -60,12 +60,6 @@ itself is empty which is `#!cpp false` in the case of a string.
|
|||||||
--8<-- "examples/empty.output"
|
--8<-- "examples/empty.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`size`](size.md) - returns the number of elements
|
|
||||||
- [`clear`](clear.md) - clears the content and resets the value to the default value
|
|
||||||
- [`basic_json_view::empty`](../basic_json_view/empty.md) - the same check on a zero-copy view
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 1.0.0.
|
- Added in version 1.0.0.
|
||||||
|
|||||||
@@ -7,12 +7,7 @@ const_iterator end() const noexcept;
|
|||||||
|
|
||||||
Returns an iterator to one past the last element.
|
Returns an iterator to one past the last element.
|
||||||
|
|
||||||
<div class="nj-fig-wrap" markdown>
|

|
||||||
--8<-- "images/range-begin-end.svg"
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="nj-caption" markdown>`end()` points to the position after the last element and `begin()` to the first element;
|
|
||||||
the dashed cell is the past-the-last position, which must not be dereferenced.</p>
|
|
||||||
|
|
||||||
## Return value
|
## Return value
|
||||||
|
|
||||||
@@ -42,14 +37,6 @@ Constant.
|
|||||||
--8<-- "examples/end.output"
|
--8<-- "examples/end.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
|
||||||
|
|
||||||
- [`begin`](begin.md) - returns an iterator to the first element
|
|
||||||
- [`cend`](cend.md) - returns a const iterator to one past the last element
|
|
||||||
- [`rend`](rend.md) - returns a reverse iterator to one before the first element
|
|
||||||
- [Iterators](../../features/iterators.md) - the article on iterators
|
|
||||||
- [`basic_json_view::end`](../basic_json_view/end.md) - the same iteration on a zero-copy view
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
- Added in version 1.0.0.
|
- Added in version 1.0.0.
|
||||||
Loaded 100 of 1595 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user