Introduction to JSON-C

The JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C, output them as JSON formatted strings and parse JSON formatted strings back into the C representation of JSON objects.

This package is known to build and work properly using an LFS 12.1 platform.

Package Information

JSON-C Dependencies



Optional (for documentation)

Doxygen-1.10.0 and Graphviz-10.0.1 (for dot tool)

Installation of JSON-C

Install JSON-C by running the following commands:

mkdir build &&
cd    build &&

      -DCMAKE_BUILD_TYPE=Release  \
      .. &&

If you have installed Doxygen-1.10.0 and Graphviz-10.0.1, you can build the documentation by running the following command:

doxygen doc/Doxyfile

To test the results, issue: make test.

Now, as the root user:

make install

If you built the documentation, install it by running the following commands as the root user:

install -d -vm755 /usr/share/doc/json-c-0.17 &&
install -v -m644 doc/html/* /usr/share/doc/json-c-0.17

Command Explanations

-DCMAKE_BUILD_TYPE=Release: This switch is used to apply a higher level of compiler optimizations.


Installed Programs: None
Installed Libraries: libjson-c.so
Installed Directories: /usr/include/json-c

Short Descriptions


contains the JSON-C API functions