C++的JSON開發包 Rapidjson
Rapidjson 是一個 C++ 的快速 JSON 解析器和生成器,使用 SAX/DOM 風格的 API 設計。
主要特點:
- 體積小,功能全,提供 SAX 和 DOM 風格的 API,僅是 SAX 解析器只有百行代碼
- 快速
- 無需依賴其他第三方庫
- Compact. Each JSON value is 16 or 20 bytes for 32 or 64-bit machines respectively (excluding text string storage). With the custom memory allocator, parser allocates memory compactly during parsing.
- Full RFC4627 compliance. Supports UTF-8, UTF-16 and UTF-32.
- Support both in-situ parsing (directly decode strings into the source JSON text) and non-destructive parsing (decode strings into new buffers).
- Parse number to int/unsigned/int64_t/uint64_t/double depending on input
- Support custom memory allocation. Also, the default memory pool allocator can also be supplied with a user buffer (such as a buffer allocated on user's heap or programme stack) to minimize allocation.
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!