遵循以下最佳实践的项目将能够自愿的自我认证,并显示他们已经实现了核心基础设施计划(OpenSSF)徽章。 显示详细资料
[](https://www.bestpractices.dev/projects/289)
<a href="https://www.bestpractices.dev/projects/289"><img src="https://www.bestpractices.dev/projects/289/badge"></a>
JSON for Modern C++ is a lightweight, single-header library designed to make JSON a first-class data type in C++. It supports seamless integration with any project using a C++11 (or later) compiler and has been tested across all major platforms. Since its inception in 2013, the library has become a staple in the C++ community, being widely adopted in numerous projects and earning over 43,000 stars on GitHub. Its robust features and ease of use make it an invaluable tool for modern software development.
The the contribution guidelines (https://github.com/nlohmann/json/blob/develop/.github/CONTRIBUTING.md) describes acceptable contributions.
DCO is enforced via the DCO GitHub app (https://github.com/settings/installations/58991705) as of December 30, 2024.
The governance model is described in https://json.nlohmann.me/community/governance/.
The project follows the code of conduct described at https://github.com/nlohmann/json/blob/develop/.github/CODE_OF_CONDUCT.md
The roles are documented in https://json.nlohmann.me/community/governance/.
The security policy is available at https://github.com/nlohmann/json/security/policy
https://github.com/nlohmann/json/blob/develop/doc/json.gif
The documentation is generated from the sources. Documentation errors are tracked just like any other issues, see https://github.com/nlohmann/json/issues?utf8=✓&q=is%3Aissue+label%3Adocumentation+
https://github.com/nlohmann/json
The project is a C++ library and is accessible just as any other source code.
The library processes JSON and does not create output other than exceptions messages (see https://json.nlohmann.me/home/exceptions/).
We use GitHub ( https://github.com/security), who meet this criterion.
All previous releases are available at https://github.com/nlohmann/json/releases
The project uses Github's issue tracker at https://github.com/nlohmann/json/issues.
There have not been any reported vulnerabilities in the past 12 months.
The process is documented in the security policy (https://github.com/nlohmann/json/security/policy).
Coding standards are part of the documentation of the quality assurance: https://json.nlohmann.me/community/quality_assurance/
The coding standards are checked with Artistic Style (http://astyle.sourceforge.net) on every commit. Code that does not follow the coding style is rejected.
The project is a header-only library, so actually no build system is required at all. The library uses CMake to compile its test cases. CMake honors set flags.
The project does not recursively build subdirectories.
The project is a header-only library. No built binary files are distributed.
The project is a single C++ header file - there is no commonly-used convention on how to install such software. The closest one can get toward this is to use the install targets in the shipped CMake file.
The project has no external dependencies.
The library only interfaces with C++'s STL. It does not use any functions or APIs that are deprecated in C++11.
The test suite is executed on every commit and pull request on multiple systems with multiple compilers and configurations: https://github.com/nlohmann/json/blob/develop/appveyor.yml https://github.com/nlohmann/json/blob/develop/.travis.yml
If possible, a regression test is implemented for any detected bug: https://github.com/nlohmann/json/blob/develop/test/src/unit-regression.cpp
Coverage is checked with every commit and pull request and is currently 100%: https://coveralls.io/github/nlohmann/json
This is explicitly mentioned in the pull request template, see https://github.com/nlohmann/json/blob/develop/.github/PULL_REQUEST_TEMPLATE.md
File https://github.com/nlohmann/json/blob/develop/.github/CONTRIBUTING.md asks contributors to add unit tests for added functionality.
See https://github.com/nlohmann/json/blob/develop/cmake/ci.cmake for the used warnings.
The quality assurance is documented at https://json.nlohmann.me/community/quality_assurance/. I lists the measures taken to avoid security issues.
This is not applicable for a JSON library.
The library does not store credentials.
The library does not have network access nor it is planned to add network access.
Releases and commits are signed, see https://github.com/nlohmann/json/releases. The public key is linked in the README file.
A tag is created for every release: https://github.com/nlohmann/json/tags
The parsers are extensively tested by a complete test suite. Furthermore, Google OSS Fuzz runs fuzz tests 24/7.
The code is constantly tested and checked with static analysis tools. Part of the software's correctness has been proved manually (see comments in the code, search for "Proof").
Various C++ static analysis tools, including Cppcheck and Clang-Tidy are used for every commit.
Memory safety is checked with Valgrind and ASAN with each commit and errors will break the build. Fuzz testing is possible with "make fuzz_testing" (using american fuzzy lop, http://lcamtuf.coredump.cx/afl/) and is executed routinely.
后退