mirror of
https://github.com/nlohmann/json.git
synced 2026-10-10 16:37:14 +00:00
Clean up README, contribution guide, and repository metadata
- REUSE.toml: fix the Hedley path and SPDX id (CC0-1.0), mark the docset icons as the public-domain JSON logo - CITATION.cff: v3.12.0 was released on 2025-04-11 - FILES.md: list all workflows, describe the Meson option defaults - README: ctest -LE, table of contents, typos, stale Android/MinGW advice, moved links, merge duplicate Thanks entries, list the analysis tools used in CI - CONTRIBUTING: iterative parser, json_literals.hpp is generated, links - .gitignore: backups and release outputs; .gitattributes: mark generated files - labeler: label other build systems and .github documentation - MODULE.bazel: add the module version Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
12 files changed
+486
-471
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
||||
# JSON for Modern C++ was originally written by Niels Lohmann.
|
||||
# Since 2013, over 250 contributors have helped to improve the library.
|
||||
# Since 2013, over 400 contributors have helped to improve the library.
|
||||
# This CODEOWNERS file is only to make sure that @nlohmann is requested
|
||||
# for a code review in case of a pull request.
|
||||
|
||||
|
||||
+12
-12
@@ -98,7 +98,7 @@ $ ctest --test-dir build -j 10
|
||||
The test suite should report:
|
||||
|
||||
```
|
||||
100% tests passed, 0 tests failed out of 98
|
||||
100% tests passed, 0 tests failed out of <number of tests>
|
||||
```
|
||||
|
||||
#### Add tests
|
||||
@@ -157,8 +157,9 @@ and each page's title (H1) and declaration by
|
||||
### Amalgamate the source code
|
||||
|
||||
The single-header files
|
||||
[`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)
|
||||
[`single_include/nlohmann/json.hpp`](https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json.hpp),
|
||||
[`single_include/nlohmann/json_fwd.hpp`](https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json_fwd.hpp), and
|
||||
[`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
|
||||
[`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:
|
||||
@@ -181,7 +182,7 @@ The amalgamation check in CI fails if any of these generated files is out of dat
|
||||
|
||||
## Recommended documentation
|
||||
|
||||
- The library’s [README file](https://github.com/nlohmann/json/blob/master/README.md) is an excellent starting point to
|
||||
- The library’s [README file](https://github.com/nlohmann/json/blob/develop/README.md) is an excellent starting point to
|
||||
understand its functionality.
|
||||
- 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)
|
||||
@@ -220,9 +221,9 @@ feature macros then allows users to test their code against the library in the n
|
||||
### Break C++11 language conformance
|
||||
|
||||
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/master/README.md#supported-compilers) should compile
|
||||
[supported C++11 compiler](https://github.com/nlohmann/json/blob/develop/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
|
||||
Studio 13.0 and earlier are known not to work due to missing or incomplete C++11 support.
|
||||
C++ 2013 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
|
||||
later against the respective [`JSON_HAS_CPP_14`](https://json.nlohmann.me/api/macros/json_has_cpp_11/) macros.
|
||||
@@ -238,12 +239,11 @@ extension.
|
||||
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
|
||||
bleeding-edge versions Clang.
|
||||
- Improving the efficiency of the **JSON parser**. The current parser is implemented as a naive recursive descent parser
|
||||
with hand-coded string handling. More sophisticated approaches like LALR parsers would be really appreciated. That
|
||||
said, parser generators like Bison or ANTLR do not play nice with single-header files -- I really would like to keep
|
||||
the parser inside the `json.hpp` header, and I am not aware of approaches similar to [`re2c`](http://re2c.org) for
|
||||
parsing.
|
||||
bleeding-edge versions of Clang.
|
||||
- Improving the efficiency of the **JSON parser**. The current parser is a hand-written iterative parser that keeps an
|
||||
explicit stack instead of recursing, with hand-coded string handling. Speeding up the lexer or the value construction
|
||||
would be appreciated. Parser generators like Bison or ANTLR do not play nice with single-header files -- I really
|
||||
would like to keep the parser inside the `json.hpp` header.
|
||||
- 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
|
||||
proper comparisons would be interesting.
|
||||
|
||||
@@ -52,7 +52,7 @@ body:
|
||||
If possible, provide a small and self-contained example that triggers
|
||||
the bug. Please understand that we cannot analyze and debug large code
|
||||
bases. Please do not paste screenshots here.
|
||||
render: Shell
|
||||
render: cpp
|
||||
- type: textarea
|
||||
id: output
|
||||
attributes:
|
||||
@@ -79,7 +79,7 @@ body:
|
||||
description: >
|
||||
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
|
||||
the commit hash. If you got the library from another source as the
|
||||
the commit hash. If you got the library from another source than the
|
||||
GitHub repository (e.g., via a package manager), please also state
|
||||
this.
|
||||
validations:
|
||||
|
||||
@@ -21,6 +21,17 @@ labels:
|
||||
files:
|
||||
- "cmake/.*"
|
||||
|
||||
# other build systems
|
||||
- label: "CMake"
|
||||
files:
|
||||
- "(meson\\.build|meson_options\\.txt|BUILD\\.bazel|MODULE\\.bazel|Package\\.swift)"
|
||||
|
||||
- label: "documentation"
|
||||
files:
|
||||
- ".github/ISSUE_TEMPLATE/.*"
|
||||
- ".github/config\\.yml"
|
||||
- ".github/(CONTRIBUTING|SECURITY|CODE_OF_CONDUCT|PULL_REQUEST_TEMPLATE)\\.md"
|
||||
|
||||
- label: "CI"
|
||||
files:
|
||||
- ".github/workflows/.*"
|
||||
|
||||
Reference in new issue
Block a user