A fast JSON parser/generator for C++ with both SAX/DOM style API
open sourceMITfree
RapidJSON is a header-only JSON parser and generator for C++ with both SAX (streaming) and DOM APIs. It depends on no external libraries, not even the STL, keeps each JSON value to 16 bytes, uses a fast allocator, and can use SSE2 or SSE4.2 for speed. It handles UTF-8, UTF-16 and UTF-32 with detection, validation and transcoding, and supports JSON Pointer, JSON Schema validation and a relaxed syntax with comments, trailing commas and NaN. Tencent publishes it on GitHub.
Problems it solves
- parse large JSON files fast in C++ without pulling in Boost
- stream-parse JSON in C++ without loading the whole document into memory
- validate JSON against a JSON Schema in a C++ program
Features
- header-only C++ JSON parser and generator
- SAX and DOM APIs
- no dependencies, not even the STL
- SSE2/SSE4.2 acceleration
- UTF-8, UTF-16 and UTF-32 with transcoding
- JSON Pointer and JSON Schema validation
Alternatives
The same job
These do what RapidJSON does.
- simdjson A C++ JSON parser that uses SIMD instructions to parse gigabytes of JSON per second
- JSON for Modern C++ What if JSON was part of modern C++?
