davegamble/cjson

Ultralightweight JSON parser in ANSI C

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 1 minute ago
Added to GitGenius on September 4th, 2026
Created on March 19th, 2016
Open Issues & Pull Requests: 360 (+0)
GitHub issues: Enabled
Number of forks: 3,518
Total Stargazers: 12,980 (+0)
Total Subscribers: 280 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 12.7 days
Mean response time: 166.3 days
90th percentile: 762.0 days
Tracked items: 79

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 99% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Only 5% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 88
New in 7 days: 2
Closed in 7 days: 0
Avg open age: 649 days
Stale 30+ days: 78
Stale 90+ days: 70

Recent activity

Opened in 7 days: 2
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (3)
  • needs info (1)

Detailed Description

cJSON is an ultralightweight JSON parser written in ANSI C.

The tool addresses the need for minimal JSON parsing in C environments where dependencies must be kept to a bare minimum. It parses JSON strings into a tree data structure and can serialize that structure back to JSON text. The parser handles basic JSON types including objects, arrays, strings, numbers, booleans, and null values. It operates in two modes: automatic parsing that handles the entire process, and manual mode for more granular control over data structure traversal and manipulation.

cJSON suits embedded systems, microcontrollers, and other resource-constrained environments where a full-featured JSON library would be excessive. The entire implementation consists of a single C source file and a single header file, making integration straightforward—developers can simply copy these two files into their project. The library is written in ANSI C to maximize compatibility across platforms and compilers. It is appropriate for projects where simplicity and minimal footprint take priority over advanced features. The README emphasizes that cJSON aims to be the simplest possible parser that gets the job done without getting in the way.

The project maintains a focused scope with documentation covering caveats around zero characters, character encoding, floating-point number handling, deep nesting limits, thread safety considerations, case sensitivity, and duplicate object member behavior. The tool can be built and integrated through multiple methods including direct source copying, CMake, Makefile, Meson, and Vcpkg, providing flexibility for different build environments.