Registry / serialization / cjson
library1.7.19vcpkgunverified

Ultralightweight JSON parser in ANSI C.

vcpkg install cjson
INSTALL
IMPORT
SIG · CJSON
C
cjson
serializationcppv1.7.19
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cjson/cJSON.h
#include <cjson/cJSON.h>

Parse a JSON string and access a value

#include "cjson/cJSON.h" #include <cstdio> int main() { const char* json = "{\"name\":\"World\"}"; cJSON* root = cJSON_Parse(json); cJSON* name = cJSON_GetObjectItem(root, "name"); printf("Hello %s\n", name->valuestring); cJSON_Delete(root); return 0; }
Debug
Known issues
gotchacJSON is not thread-safe by default; concurrent access to the same object requires external synchronization.
fix
Use separate cJSON objects per thread or add mutex protection.
affects: all
Upgrade
Version history
1.7.19latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources

No resource links recorded.

cjson — pip install cjson · libregistry