A high-performance, portable, and strict JSON library written in ANSI C, capable of reading/writing gigabytes per second.
yyjson is a high-performance JSON library written in ANSI C, designed for parsing and serializing JSON data at exceptional speeds. It solves the need for fast, portable, and standards-compliant JSON handling in performance-critical C applications, offering features like JSON5 support and accurate number handling.
C developers working on performance-sensitive applications such as data processing, embedded systems, or high-throughput services that require efficient JSON parsing and generation.
Developers choose yyjson for its combination of extreme speed, strict RFC 8259 compliance, and portability across platforms, all while maintaining a simple integration with just two files.
The fastest JSON library in 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 yyjson parsing and serializing gigabytes per second, outperforming competitors like RapidJSON and simdjson in DOM API tests on modern CPUs, as evidenced in performance charts.
Adheres to RFC 8259 JSON standard with accurate handling of int64, uint64, and double numbers, ensuring data integrity and UTF-8 validation, which is critical for interoperability.
Written in ANSI C (C89) with no dependencies, it integrates into any C project with just one header and one source file, making it ideal for embedded and cross-platform development.
Supports JSON Pointer, Patch, and Merge Patch for advanced querying and modification, plus optional JSON5 features, enabling complex JSON operations without external tools.
Arrays and objects are stored as linked lists, making element access by index or key slower than in array-based libraries, as admitted in the limitations section.
Parsed JSON documents are read-only; any modification requires creating a mutable copy, adding memory and performance overhead for dynamic data manipulation.
Optimal performance relies on modern processors with good branch prediction and compilers like clang, which may limit efficiency on older or less optimized systems.