Want this for your repo?
Render a free sample of any GitHub repo in seconds.
Contributors
213
Lines of Code
13,995
From
Jul 4, 2013
To
Dec 20, 2020
About nlohmann/json
This is a comprehensive JSON library for modern C++ that provides intuitive, easy-to-use JSON handling as a first-class data type. The library is distributed as a single header file, requiring no external dependencies or complex build configuration. It enables developers to work with JSON objects and arrays using natural C++ syntax, including operator overloading that makes JSON feel native to the language.
The library supports the full spectrum of JSON operations: parsing and serialization from strings and files, element access and modification using STL-like interfaces, and type conversions to and from standard C++ containers like vectors and maps. Beyond standard JSON, it implements JSON Pointer (RFC 6901), JSON Patch (RFC 6902), and JSON Merge Patch specifications for manipulating JSON documents. It also supports binary formats including BSON, CBOR, MessagePack, UBJSON, and BJData for efficient serialization when needed.
The project prioritizes code quality and reliability through comprehensive unit testing with 100 percent code coverage, continuous fuzzing via Google OSS-Fuzz, memory leak detection with Valgrind and Clang Sanitizers, and adherence to Core Infrastructure Initiative best practices. The library is widely adopted across the industry and available through all major package managers. While not optimized for peak performance or minimal memory overhead, it excels at developer productivity and ease of integration, making it the go-to choice for C++ developers who need straightforward JSON support without implementation hassle.