json-c-0.19

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.

[Note]

Note

This version of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable version of the System V books.

Package Information

json-c Dependencies

Required

CMake-4.4.2

Optional (for documentation)

Doxygen-1.18.0 and Graphviz-15.1.1 (for dot tool)

Installation of json-c

Install json-c by running the following commands:

mkdir build &&
cd    build &&

cmake -D CMAKE_INSTALL_PREFIX=/usr \
      -D CMAKE_BUILD_TYPE=Release  \
      -D BUILD_STATIC_LIBS=OFF     \
      .. &&
make

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

doxygen doc/Doxyfile

To test the results, issue: make USE_VALGRIND=0 test. Note that testing with the latest valgrind causes several test failures.

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.19 &&
install -v -m644 doc/html/* /usr/share/doc/json-c-0.19

Command Explanations

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

Contents

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

Short Descriptions

libjson-c.so

contains the json-c API functions