The nlohmann/json repository is a C++ library that provides JSON parsing, serialization, and manipulation capabilities designed to make JSON feel like a first-class data type in modern C++. The library is implemented as a single header file, json.hpp, requiring no external dependencies or complex build system integration. This header-only design allows developers to add JSON support to their projects by simply including one file, with no need to adjust compiler flags or project settings.
The library implements the basic_json template class that can be customized to work with different underlying data structures. By default, it uses standard C++ containers including std::string for strings, std::map for objects, std::vector for arrays, int64_t and uint64_t for integers, double for floating-point numbers, and bool for Boolean values. The design prioritizes intuitive syntax and ease of integration over memory efficiency and raw parsing speed, making it accessible to developers familiar with standard C++ containers.
The repository supports multiple JSON-related standards and formats as indicated by its topic tags. It implements RFC specifications including RFC 6901 for JSON Pointer, RFC 6902 for JSON Patch, RFC 7159 and RFC 8259 for JSON itself, and RFC 7049 for CBOR. Beyond standard JSON, the library handles binary formats including BSON, CBOR, MessagePack, UBJSON, and BJData, providing versatility for different data interchange scenarios. The library also supports JSON Merge Patch functionality for merging JSON documents.
Quality assurance is a central focus of the project. The codebase achieves 100 percent code coverage through extensive unit testing and has been verified for memory leaks using Valgrind and Clang Sanitizers. Google OSS-Fuzz continuously runs fuzz tests against all parsers, having executed billions of tests to date. The project follows Core Infrastructure Initiative best practices to maintain high quality standards.
The repository shows significant community engagement and maintenance activity. According to GitGenius tracking data, the primary maintainer nlohmann has logged 1008 events, with gregmarr contributing 152 events and risa2000 contributing 22 events. The issue and pull request response latency shows a median of 0.0 hours with a mean of 9038.8 hours across 296 tracked items, indicating rapid initial responses to submissions. The most active issue labels are kind: bug with 199 occurrences, solution: proposed fix with 125 occurrences, and state: stale with 36 occurrences, reflecting an active bug tracking and resolution process.
The library has attracted attention from major technology companies and projects. GitGenius identifies overlapping contributors with microsoft/vscode, microsoft/typescript, and rust-lang/rust, indicating adoption and integration within significant open-source ecosystems. The project maintains comprehensive documentation at json.nlohmann.me, including API references, FAQ sections, and code examples. Support is provided through multiple channels including GitHub discussions, issue tracking, and offline documentation available through Dash, Velocity, and Zeal docset browsers. The project is sponsored by individuals and organizations including Mercedes-Benz Group and receives IDE tool support from JetBrains.