Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. json-c

json-c

NOASSERTIONC

A JSON implementation in C with reference counting object model for constructing, parsing, and serializing JSON objects.

Visit WebsiteGitHubGitHub
3.3k stars1.1k forks0 contributors

What is json-c?

JSON-C is a JSON implementation in C that provides a reference counting object model for constructing, parsing, and serializing JSON objects. It enables C applications to handle JSON data easily by offering functions to create JSON objects, convert them to strings, and parse JSON strings back into C structures. The library conforms to RFC 8259 and is designed for reliability and interoperability in JSON processing.

Target Audience

C developers working on applications that require JSON data interchange, such as embedded systems, network services, or cross-platform tools. It is also suitable for projects needing a lightweight, standard-compliant JSON library without external dependencies.

Value Proposition

Developers choose JSON-C for its straightforward reference counting model, which simplifies memory management, and its adherence to JSON standards. Its partial threading support and flexible build options make it adaptable to various performance and deployment requirements.

Overview

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/

Use Cases

Best For

  • Embedded systems requiring JSON data parsing in C
  • Network services that need to serialize/deserialize JSON payloads
  • Cross-platform C applications with JSON configuration files
  • Tools and utilities that process JSON data in resource-constrained environments
  • Educational projects demonstrating JSON handling in C
  • Legacy C codebases integrating modern JSON interchange

Not Ideal For

  • Projects requiring full multi-threaded safety without performance penalties
  • High-performance applications where JSON parsing speed is critical
  • Modern C++ projects where libraries like RapidJSON offer more features
  • Systems with minimal memory footprint, as reference counting adds overhead

Pros & Cons

Pros

Reference Counting Simplicity

Automates memory management through json_object_get() and json_object_put(), reducing manual allocation errors and simplifying object lifecycle.

Standards Compliance

Conforms to RFC 8259, ensuring JSON interoperability and correctness in data interchange.

Flexible Build Configuration

Offers CMake options for static/shared libraries and supports niche platforms like Android and Amiga, as shown in the build instructions.

JSON Pointer Support

Implements RFC 6901 for precise object retrieval from JSON trees, enhancing data manipulation capabilities.

Cons

Performance Overhead

Partial threading support uses atomic operations that can make json_object_get() and json_object_put() 3x slower, impacting performance in threaded programs.

Limited Thread Safety

Only provides atomic operations for basic functions, not full multi-threaded access to object trees, which can lead to concurrency issues.

Build Complexity

Setting up for platforms like Android or Amiga requires specific toolchains and Docker containers, adding development overhead.

Frequently Asked Questions

Quick Stats

Stars3,261
Forks1,100
Contributors0
Open Issues13
Last commit2 months ago
CreatedSince 2010

Tags

#c-library#hacktoberfest#embedded-systems#c#cmake#data-interchange#json-serialization#cross-platform#json#json-parser

Built With

v
vcpkg
D
Doxygen
C
CMake
C
C++

Links & Resources

Website

Included in

C/C++70.6k
Auto-fetched 1 day ago

Related Projects

JSON for Modern C++JSON for Modern C++

JSON for Modern C++

Stars49,451
Forks7,370
Last commit14 days ago
simdjsonsimdjson

Parsing gigabytes of JSON per second : used by Facebook/Meta Velox, the Node.js runtime, ClickHouse, WatermelonDB, Apache Doris, Milvus, StarRocks

Stars23,678
Forks1,240
Last commit2 days ago
RapidJSONRapidJSON

A fast JSON parser/generator for C++ with both SAX/DOM style API

Stars15,033
Forks3,640
Last commit1 year ago
cJSONcJSON

Ultralightweight JSON parser in ANSI C

Stars12,624
Forks3,470
Last commit15 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub