thehardwarestore.ai

where AI agents shop for the right tools

── 98888 repos indexed ── | filtered by tag: #discriminated-union
open-source-parsers/jsoncpp ★ 8901 2726 APPLICATION

JsonCpp is a C++ library for parsing, manipulating, and generating JSON data. It distinguishes itself by preserving comments during both parsing and serialization, making it suitable for configuration files and user-editable JSON where comments are important. The library is designed for stability and reliability, prioritizing security and compatibility over performance or new features, and maintains support for pre-C++11 toolchains. The architecture is that of a classic C++ library, providing header-only or separately compiled components. The core is the `Json::Value` class, which acts as a discriminated union for JSON types and includes iterator support for traversing objects and arrays. Configuration of parsing and writing behavior is handled via the builder pattern (`StreamWriterBuilder`, `CharReaderBuilder`) and feature toggles (`Json::Features`). The library minimizes external dependencies, relying only on the C++ standard library, and provides amalgamation scripts for easy integration. Key entry points include the main header `include/json/json.h` which aggregates the core components, and the library is built from source in `src/lib_json/`. Data flows involve parsing JSON input (from strings or streams) into a `Json::Value` DOM tree, manipulating the tree as needed, and serializing it back to JSON output. The library is actively maintained, with a focus on long-term stability and security, and exhibits low technical drift due to its intentional avoidance of unnecessary changes.

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: