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.
Download (HTTP): https://s3.amazonaws.com/json-c_releases/releases/json-c-0.18.tar.gz
Download SHA256 Sum: 876ab046479166b869afc6896d288183bbc0e5843f141200c677b3e8dfb11724
Download MD5 sum: e6593766de7d8aa6e3a7e67ebf1e522f
Download size: 1,924.2 KB
Estimated disk space required: 4,298.7 KB
Estimated build time: less than 0.1 SBU
"doxygen" and Graphviz-14.0.4 (for dot tool)
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=OFFcmake --build build
To test the results, issue:
cd build make test cd ../
Now Install the package, as the root user:
cmake --install build
-D CMAKE_BUILD_TYPE=Release: This switch is
used to apply a higher level of compiler optimizations.