JSON-C-0.16

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

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

Package Information

JSON-C Dependencies

Required

CMake-3.27.0

Installation of JSON-C

Install JSON-C by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=Release \
      -DBUILD_STATIC_LIBS=OFF    \
      .. &&
make

To test the results, issue: make test.

Now, as the root user:

make install

Command Explanations

-DCMAKE_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