A lightweight, extremely high-performance, in-place DOM-style JSON parser for C++11.
sajson is a lightweight, extremely high-performance JSON parser for C++11 that parses documents into a contiguous AST structure in-place. It modifies the input string during parsing, converting string values to UTF-8, and does not require null-terminated input buffers, making it ideal for parsing from sources like disk mmaps or network buffers.
C++ developers working on performance-critical applications, embedded systems, or projects requiring efficient JSON parsing without external dependencies or runtime overhead.
Developers choose sajson for its exceptional parsing speed, minimal memory footprint, and flexible allocation modes, offering a faster alternative to libraries like RapidJSON while maintaining a simple, single-header design.
Lightweight, extremely high-performance JSON parser for C++11
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Just drop sajson.h into your project with no external dependencies, making integration trivial and dependency-free.
Object lookups are O(lg N) and array indexing O(1), enabling fast access to parsed data without linear searches, as highlighted in the README.
Supports single, dynamic, and bounded allocation strategies, allowing optimization for different memory constraints, from high-performance to embedded systems.
Uses no exceptions or RTTI, ensuring consistent execution and minimal overhead, ideal for real-time or resource-constrained applications.
Parses in-situ and alters the input buffer during UTF-8 conversion, which can be problematic if the data needs to remain immutable or is shared.
Only supports UTF-8; handling UTF-16 or UTF-32 requires pre-transcoding, adding complexity for non-UTF-8 sources, as admitted in the README.
Restricted to 32-bit integers and doubles, potentially causing overflow or compatibility issues with JSON documents containing large integers.
sajson is an open-source alternative to the following products: