kgabis/parson
FreeLightweight JSON library written in C.
FreeFree tier
About kgabis/parson
Parson is a lightweight, C89-compatible JSON library written in C. It consists of only two files (parson.h and parson.c) and offers a simple API for parsing, serializing, and manipulating JSON data. Features include dot notation for accessing nested values, JSON validation, and support for file I/O. The library includes comprehensive test suites and is designed for easy integration into C projects.
Key Features
Lightweight (only 2 files: parson.h and parson.c)
Simple API for parsing, serialization, and manipulation
Dot notation for accessing nested JSON values (e.g., objectA.objectB.value)
C89 compatible
JSON validation against a schema
Parsing from files or strings
Serializing JSON values to files or strings
Includes test suites
Pros & Cons
Pros
- Extremely lightweight and simple to integrate
- C89 compatible for broad platform support
- Easy-to-use dot notation for accessing nested values
- Includes validation capabilities
- Minimal dependencies
Cons
- Not suitable for streaming or high-performance parsing
- Limited to basic JSON operations; no advanced features like JSONPath
Best For
Parsing JSON data from web APIsPersisting user configuration or data to JSON filesSerializing C data structures to JSONInterchanging data in C applications using JSON