JSON-C-0.18

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.4 platform.

Package Information

JSON-C Dependencies

Required

CMake-4.1.3

Optional (for documentation)

"doxygen" and Graphviz-14.0.4 (for dot tool)

Installation of JSON-C

First, fix building this package with CMake-4.0:

sed -i 's/VERSION 2.8/VERSION 4.0/' apps/CMakeLists.txt  &&
sed -i 's/VERSION 3.9/VERSION 4.0/' tests/CMakeLists.txt

Prepare JSON-C by running the following commands:

cmake -B build \
      -D CMAKE_INSTALL_PREFIX=/usr \
      -D CMAKE_BUILD_TYPE=Release  \
      -D BUILD_STATIC_LIBS=OFF
cmake --build build

To test the results, issue:

cd build
make test
cd ../

Now Install the package, as the root user:

cmake --install build

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