libjson is a json parser/generator library for C.
You can also clone this repository using fossil to compile the library and play with the examples provided:
$ fossil clone https://foutaise.org/fossil/libjson
$ cd libjson $ make
The json.h file provide details on libjson API.
See the examples directory for several examples of libjson usage.