No description
  • C 94.6%
  • M4 2%
  • Makefile 1.7%
  • HTML 1.4%
  • Shell 0.2%
Find a file
Aaron Kling 47c830a245
libjson: Convert makefile to blueprint
To make it available as a dependency to blueprint targets

Change-Id: Ic11457bb90be9f80c0deff7887b64d69579ce690
2024-09-16 12:10:09 +03:00
.gitupstream Add .gitupstream file 2024-09-16 12:10:07 +03:00
Android.bp libjson: Convert makefile to blueprint 2024-09-16 12:10:09 +03:00
Android.configure.mk Add an Android-friendly build system 2012-04-26 13:18:33 +05:30
arraylist.c Move the json_min() and json_max() macros to json_util.h and mark everything else in bits.h deprecated. 2014-05-04 22:33:26 -04:00
arraylist.h Add new json_object_array_sort function 2011-10-07 21:07:18 +02:00
AUTHORS Add Jehiah and myself to the list of authors. 2011-06-14 09:56:00 -05:00
autogen.sh Default autogen.sh to not running configure, unless some command line options are specified. 2012-07-29 12:18:37 -05:00
bits.h Move the json_min() and json_max() macros to json_util.h and mark everything else in bits.h deprecated. 2014-05-04 22:33:26 -04:00
ChangeLog Bump versions up to 0.12.99 since a 0.12 release was just created. 2014-04-10 22:44:13 -04:00
config.h libjson: Initial version with support for android 2015-03-06 13:54:32 -08:00
config.h.in libjson: Initial version with support for android 2015-03-06 13:54:32 -08:00
configure.ac Bump versions up to 0.12.99 since a 0.12 release was just created. 2014-04-10 22:44:13 -04:00
COPYING Add my copyright. 2012-07-29 20:02:00 -05:00
debug.c Eliminate the deprecated mc_abort() function and MC_ABORT macro. 2014-03-22 21:48:34 -04:00
debug.h Eliminate the deprecated mc_abort() function and MC_ABORT macro. 2014-03-22 21:48:34 -04:00
Doxyfile Bump versions up to 0.12.99 since a 0.12 release was just created. 2014-04-10 22:44:13 -04:00
json-c-uninstalled.pc.in Re-add the "json" pkg-config file as a compatibility shim. 2012-07-29 18:25:09 -05:00
json-c.pc.in Modify install names for library and include files 2012-04-05 19:38:02 -07:00
json.h Move the json_min() and json_max() macros to json_util.h and mark everything else in bits.h deprecated. 2014-05-04 22:33:26 -04:00
json_c_version.c Add a json_c_version.h header (included from json.h), and several macros and functions for retrieving the json-c version at compile-time and run-time. 2012-12-23 10:57:44 -06:00
json_c_version.h Bump versions up to 0.12.99 since a 0.12 release was just created. 2014-04-10 22:44:13 -04:00
json_config.h libjson: Initial version with support for android 2015-03-06 13:54:32 -08:00
json_config.h.in Include json_inttypes.h in json_object.h since we use types like int32_t in the API and some systems need that header to compile. 2012-02-15 20:47:11 -06:00
json_inttypes.h Fix the _MSC_VER check so it compiles on non-windows compilers. Issue#91 2013-06-23 19:12:14 -05:00
json_object.c Check for failures when allocating memory; return NULL and set errno=ENOMEM in a few of those cases. 2014-04-19 20:33:05 -04:00
json_object.h Merge pull request #153 from LeSpocky/doc 2014-09-13 22:18:51 -04:00
json_object_iterator.c Since we already use a local json_bool type, replace any stdbool.h usage with 2012-04-24 21:54:07 -05:00
json_object_iterator.h Issue #76: use old style comment to allow json_object_iterator.h to build in ansi mode. 2013-04-30 09:47:19 -05:00
json_object_private.h Add a json_set_serializer() function to allow the string output of a json_object to be customized. 2012-09-02 15:21:56 -05:00
json_tokener.c Move the json_min() and json_max() macros to json_util.h and mark everything else in bits.h deprecated. 2014-05-04 22:33:26 -04:00
json_tokener.h Patch to address the following issues: 2014-04-09 13:48:21 +08:00
json_util.c Move the json_min() and json_max() macros to json_util.h and mark everything else in bits.h deprecated. 2014-05-04 22:33:26 -04:00
json_util.h Move the json_min() and json_max() macros to json_util.h and mark everything else in bits.h deprecated. 2014-05-04 22:33:26 -04:00
libjson.c Add an autoconf test to test whether the .section .gnu<warning> 2012-09-09 17:36:30 -07:00
linkhash.c Patch to address the following issues: 2014-04-09 13:48:21 +08:00
linkhash.h Patch to address the following issues: 2014-04-09 13:48:21 +08:00
Makefile.am Patch to address the following issues: 2014-04-09 13:48:21 +08:00
Makefile.am.inc Patch to address the following issues: 2014-04-09 13:48:21 +08:00
math_compat.h Issue #103: allow Infinity and -Infinity to be parsed. 2014-03-22 17:28:40 -04:00
printbuf.c Move the json_min() and json_max() macros to json_util.h and mark everything else in bits.h deprecated. 2014-05-04 22:33:26 -04:00
printbuf.h Remove the "#undef PRINTBUF_DEBUG" from printbuf.h so it can be more easily turned on in the Makefile. 2012-04-04 17:11:38 -07:00
random_seed.c Merge pull request #150 from ams-cs/master 2014-09-13 22:17:57 -04:00
random_seed.h Patch to address the following issues: 2014-04-09 13:48:21 +08:00
README Add an empty README file to placate autoconf. 2014-04-19 20:22:44 -04:00
README-WIN32.html strndup is gone, remove it from the README file. 2013-09-08 17:21:52 -05:00
README.html Update README files with pointers to new github repo and googlegroups mailing list 2011-06-14 10:04:24 +08:00
README.md Fix minor typo in README file. 2014-04-19 20:11:05 -04:00
RELEASE_CHECKLIST.txt Update the release checklist to include calculating the tarball checksums and updating the wiki. 2014-04-11 20:07:49 -04:00

json-c

Building on Unix with git, gcc and autotools

Home page for json-c: https://github.com/json-c/json-c/wiki

Caution: do NOT use sources from svn.metaparadigm.com, they are old.

Prerequisites:

  • gcc, clang, or another C compiler
  • libtool

If you're not using a release tarball, you'll also need:

  • autoconf (autoreconf)
  • automake

Make sure you have a complete libtool install, including libtoolize.

json-c GitHub repo: https://github.com/json-c/json-c

$ git clone https://github.com/json-c/json-c.git
$ cd json-c
$ sh autogen.sh

followed by

$ ./configure
$ make
$ make install

To build and run the test programs:

$ make check

Linking to libjson-c

If your system has pkgconfig, then you can just add this to your makefile:

CFLAGS += $(shell pkg-config --cflags json-c)
LDFLAGS += $(shell pkg-config --libs json-c)

Without pkgconfig, you would do something like this:

JSON_C_DIR=/path/to/json_c/install
CFLAGS += -I$(JSON_C_DIR)/include/json-c
LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c