A JSON implementation in C with reference counting object model for constructing, parsing, and serializing JSON objects.
JSON-C is a JSON implementation library written in C that provides a reference counting object model for handling JSON data. It allows developers to construct JSON objects programmatically, serialize them to strings, and parse JSON strings back into C data structures. The library aims to conform to RFC 8259, ensuring standards-compliant JSON processing.
C developers who need to work with JSON data in applications, particularly those in embedded systems, cross-platform projects, or environments where a lightweight, native C library is required.
Developers choose JSON-C for its straightforward reference counting model that simplifies memory management, its adherence to JSON standards, and its optional threading support. It is a mature, widely-used library with extensive documentation and community support.
https://github.com/json-c/json-c is the official code repository for json-c. See the wiki for release tarballs for download. API docs at http://json-c.github.io/json-c/
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Adheres strictly to the JSON standard, ensuring reliable interoperability with other systems as highlighted in the project overview and key features.
Uses reference counting to simplify object lifecycle, reducing manual memory management errors when constructing and parsing JSON objects, as described in the using section.
Supports building on diverse platforms including Unix, Windows via vcpkg, Android, and even Amiga, detailed in the README's build instructions.
Includes JSON Pointer (RFC 6901) support for precise object retrieval from JSON trees, mentioned in the key features and header files list.
Thread safety is only optional and limited to atomic operations for get and put functions; enabling it can slow performance by up to 3x, as admitted in the CMake options section.
Requires CMake and manual setup with multiple options, which can be daunting for developers seeking quick integration without build tool expertise.
The reference counting model and optional atomic operations introduce overhead that may not suit high-throughput JSON processing applications.