A high-performance, minimal JSON parsing and serialization library for C++ that prioritizes speed, fast compilation, and small code size.
json.cpp is a JSON parsing and serialization library for C++ that emphasizes performance, fast compilation, and a minimal code footprint. It solves the problem of slow build times and runtime overhead associated with larger JSON libraries, offering a streamlined alternative for developers who need efficient JSON handling without bloat.
C++ developers working on performance-sensitive applications, embedded systems, or projects where compilation speed and library size are critical constraints.
Developers choose json.cpp for its significant speed advantages, drastically faster compilation times, and tiny, auditable codebase, which together provide a reliable and efficient JSON solution without the complexity of larger libraries.
JSON for Classic C++
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks show 2-3x faster parsing than nlohmann/json, making it ideal for high-throughput applications like HTTP servers.
Compiles approximately 10x faster, significantly reducing build times and overhead in development cycles.
With over 10x less code than alternatives, it's easily customizable, auditable, and suitable for resource-constrained environments.
Passes all JSONTestSuite test cases, ensuring reliable and compliant JSON parsing and serialization.
Remembers float types to serialize them efficiently, avoiding precision loss for applications like serving embeddings, as highlighted in the README.
Requires Google's double-conversion library for float handling, adding complexity to the build process and dependency management.
Lacks higher-level features like automatic type mapping or integrated schema support, focusing on minimalism over developer ergonomics.
While the README provides examples, it lacks comprehensive API documentation, which could hinder adoption for complex use cases.
Rejects some UTF-8 variations that other libraries might accept, potentially causing issues with data from non-conformant sources, as seen in the test case failures.