yyjson is a JSON parsing and serialization library written in ANSI C that prioritizes performance across diverse hardware platforms.
The library addresses the need for fast JSON processing in C applications by implementing a high-performance parser and serializer that can handle gigabytes of data per second. It achieves this speed while maintaining strict RFC 8259 compliance, ensuring correct number formatting and UTF-8 validation. The tool supports both reading and writing operations, with particular strength in in-situ parsing where the input buffer is modified during parsing. It includes support for JSON Pointer, JSON Patch, and JSON Merge Patch standards for querying and modifying parsed data, and offers optional JSON5 feature support for extended syntax compatibility.
The library suits projects where C integration is required and performance matters, particularly embedded systems and high-throughput server applications. Its single-file integration model—requiring only one header and one source file—makes adoption straightforward with minimal build complexity. The tool's ANSI C compliance ensures portability without relying on SIMD instructions, though this means it trades some potential speed for broader hardware compatibility. Developers should be aware that element access by index or key is slower than iterator-based traversal due to the underlying data structure design, and that parsed results are immutable, requiring explicit copying for modifications. The README notes that simdjson's On Demand API performs better when JSON field structure is known at compile time, though direct performance comparisons in the provided benchmarks focus on DOM API usage.
Development activity shows consistent attention to performance validation across multiple platforms and architectures, with benchmark reports covering Intel, AMD, ARM, and Apple processors. The project maintains a dedicated benchmark repository with interactive performance charts and tests across different compilers and operating systems. Documentation is comprehensive, including detailed API reference and performance analysis, indicating sustained effort toward clarity and usability.