For a lightweight json library for C++, the first results are miloyip/rapidjson (RapidJSON is a high-performance, header-only C++ library that provides both DOM and SAX-style interfaces for parsing and serializing JSON, making it a comprehensive solution for the requested requirements), nlohmann/json (This library is a header-only C++ JSON parser that provides a comprehensive, intuitive API for DOM-based manipulation, serialization, and streaming, making it the industry-standard choice for this category) and tencent/rapidjson (RapidJSON is a high-performance, header-only C++ library that provides both DOM-based and SAX-style parsing, making it a comprehensive solution for JSON manipulation that aligns perfectly with your requirements). simdjson/simdjson and open-source-parsers/jsoncpp round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
We curate open-source GitHub repositories matching “best c++ json libraries”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
RapidJSON is a high-performance C++ library used for parsing and generating JSON data. It provides both document object model and stream-based interfaces to transform JSON strings into structured data and vice versa. The library includes a JSON schema validator to verify that documents conform to predefined rules and a Unicode transcoder for converting strings between UTF-8, UTF-16, and UTF-32 encodings. It also supports relaxed parsing for non-standard JSON containing comments or trailing commas. Additional capabilities cover JSON pointer navigation for locating specific values and string s
RapidJSON is a high-performance, header-only C++ library that provides both DOM and SAX-style interfaces for parsing and serializing JSON, making it a comprehensive solution for the requested requirements.
This library is a header-only C++ framework designed for the serialization, parsing, and manipulation of structured data. It provides a recursive variant data model that represents arbitrary structures as native types, allowing developers to navigate, modify, and patch hierarchical data using standard pointer paths and declarative update patterns. The project distinguishes itself through its template-based architecture, which enables type-safe data structures and custom type mapping at compile time. It offers a unified interface for binary format abstraction, supporting multiple compact repre
This library is a header-only C++ JSON parser that provides a comprehensive, intuitive API for DOM-based manipulation, serialization, and streaming, making it the industry-standard choice for this category.
RapidJSON is a header-only C++ library designed for high-performance parsing, generation, and manipulation of JSON data. It functions as a dual-mode engine, providing both an in-memory document object model for tree-based manipulation and a stream-based interface for event-driven processing. The library is built to minimize memory footprint and maximize execution speed, making it suitable for resource-constrained environments. The library distinguishes itself through advanced memory management and optimization techniques, including in-situ parsing that modifies input buffers directly to elimi
RapidJSON is a high-performance, header-only C++ library that provides both DOM-based and SAX-style parsing, making it a comprehensive solution for JSON manipulation that aligns perfectly with your requirements.
simdjson is a high-performance, header-only C++ library designed for parsing, querying, and serializing JSON data with minimal memory overhead. It functions as a hardware-aware data processing engine that leverages vector instructions to achieve gigabyte-per-second parsing speeds. By detecting host processor capabilities at runtime, the library automatically selects the most efficient instruction sets to accelerate structural analysis and validation. The library distinguishes itself through a focus on extreme efficiency and resource management. It utilizes memory mapping and padded buffer ali
This library provides a high-performance, header-only solution for parsing and manipulating JSON that leverages SIMD instructions for extreme efficiency, perfectly matching the requirements for a modern C++ JSON tool.
JsonCpp is a C++ library for parsing, manipulating, and generating JSON data. It functions as a data interchange tool that provides a JSON parser to convert formatted text into structured data and a JSON serializer to transform internal data structures back into valid JSON strings. The library features the ability to preserve non-standard JSON comments during the deserialization and serialization process, which supports the management of human-readable configuration files. The project implements a tree-based internal representation for programmatic data access and uses a builder-based config
JsonCpp is a well-established C++ library that provides the requested DOM-based parsing, serialization, and manipulation capabilities, though it is a traditional compiled library rather than a header-only one.
A tiny JSON library for C++11.
This is a lightweight, header-only C++11 library that provides simple DOM-based parsing and serialization, making it a straightforward choice for projects requiring minimal integration overhead.
🗄️ single header json parser for C and C++
This is a single-header JSON parser for C and C++ that provides a lightweight, easily integrated solution for parsing and manipulating JSON data.
ArduinoJson is a C++ library for parsing and manipulating JSON data and MessagePack binary streams on microcontrollers with limited memory and processing power. It provides the core primitives necessary for embedded data serialization and parsing, enabling devices to exchange structured data over serial or network interfaces. The library is distinguished by its focus on microcontroller memory management, employing strategies such as pool-based allocation, string deduplication, and non-owning string views to minimize RAM usage. It further optimizes for constrained environments by allowing cons
This library provides efficient JSON parsing and serialization specifically optimized for memory-constrained environments, making it a highly capable choice for C++ projects where performance and resource management are critical.
UltraJSON is a high-performance JSON library and parser written in C with bindings for Python. It provides a fast alternative to standard JSON processing for decoding JSON strings into native data structures and encoding data structures back into JSON strings. The library utilizes a C-based engine to reduce processing latency and increase throughput for JSON generation and parsing. It is designed to accelerate data pipelines and optimize the handling of JSON payloads.
This is a C-based library primarily designed for Python bindings rather than a native C++ library intended for integration into C++ projects, making it a building block for other languages rather than a C++ JSON tool.
jq is a command-line JSON processor and data transformer. It provides a functional query language used to slice, filter, map, and transform structured JSON data directly within a terminal. The utility functions as a data transformer that reshapes JSON input into different structures or formats based on declarative logic. This allows for the extraction and analysis of structured data from sources such as API responses and system logs.
This is a command-line utility for processing JSON rather than a C++ library intended for integration into your own codebase for parsing and serialization.
cJSON is a lightweight library for parsing, creating, and modifying JSON data structures within C applications. It provides a comprehensive set of utilities for transforming raw text into navigable objects, manipulating data fields within collections, and serializing complex structures into formatted or unformatted strings. The library is designed for memory-sensitive and resource-constrained environments, utilizing manual memory management and type-tagged union structures to maintain a minimal footprint. It employs recursive descent parsing and in-place string manipulation to process data ef
This is a C library designed for memory-constrained environments, which lacks the C++-specific features, type safety, and modern standard support expected for a C++ JSON library.
Superjson is a lossless JSON serialization library and data transcoder. It converts complex JavaScript and TypeScript data types into strings and metadata to ensure that type identity is preserved during data transfer. The library preserves non-native types such as Dates, Maps, and Sets by splitting values into a JSON-compatible payload and a separate map of type-specific metadata. It utilizes a registry-based mapping system that allows for the definition of custom type handlers to manage third-party data types during serialization and deserialization. This utility supports cross-process dat
This is a TypeScript library designed for serializing complex JavaScript objects with type metadata, which does not provide the C++ implementation or the DOM/SAX parsing capabilities required for a C++ JSON library.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| miloyip/rapidjson | 15.1K | C++ | NOASSERTION | |
| nlohmann/json | 49.9K | C++ | MIT | |
| tencent/rapidjson | 15K | C++ | other | |
| simdjson/simdjson | 23.3K | C++ | apache-2.0 | |
| open-source-parsers/jsoncpp | 8.9K | C++ | NOASSERTION | |
| dropbox/json11 | 2.6K | C++ | MIT | |
| sheredom/json.h | 826 | C | Unlicense | |
| bblanchon/arduinojson | 7.2K | C++ | MIT | |
| esnme/ultrajson | 4.5K | C++ | NOASSERTION | |
| stedolan/jq | 34.9K | C | NOASSERTION |