Skip to content
This repository

Official code repository for json-c. See the wiki for release tarballs for download.

Octocat-spinner-32 tests Simplify the tests Makefile to avoid repeating the name of each test. March 22, 2014
Octocat-spinner-32 .gitignore Rename the "test_case" test to "test_charcase" to make it slightly le… March 22, 2014
Octocat-spinner-32 AUTHORS Add Jehiah and myself to the list of authors. June 14, 2011
Octocat-spinner-32 Android.configure.mk Add an Android-friendly build system April 26, 2012
Octocat-spinner-32 COPYING Add my copyright. July 29, 2012
Octocat-spinner-32 ChangeLog Bump versions up to 0.12.99 since a 0.12 release was just created. April 10, 2014
Octocat-spinner-32 Doxyfile Bump versions up to 0.12.99 since a 0.12 release was just created. April 10, 2014
Octocat-spinner-32 Makefile.am Patch to address the following issues: April 09, 2014
Octocat-spinner-32 Makefile.am.inc Patch to address the following issues: April 09, 2014
Octocat-spinner-32 NEWS Add a dummy "NEWS" file to automake doesn't complain. May 03, 2011
Octocat-spinner-32 README Mention that libtoolize is needed if you're not using a release tarball. June 23, 2013
Octocat-spinner-32 README-WIN32.html strndup is gone, remove it from the README file. September 08, 2013
Octocat-spinner-32 README.html Update README files with pointers to new github repo and googlegroups… June 14, 2011
Octocat-spinner-32 RELEASE_CHECKLIST.txt Update the release checklist to include calculating the tarball check… April 11, 2014
Octocat-spinner-32 arraylist.c Merge pull request #27 from OBI-1/master May 30, 2012
Octocat-spinner-32 arraylist.h Add new json_object_array_sort function October 07, 2011
Octocat-spinner-32 autogen.sh Default autogen.sh to not running configure, unless some command line… July 29, 2012
Octocat-spinner-32 bits.h add json_tokener_parse_verbose, and return NULL on parser errors December 08, 2010
Octocat-spinner-32 config.h.in Patch to address the following issues: April 09, 2014
Octocat-spinner-32 config.h.win32 Direct people to send bug reports to the json-c google group. April 02, 2012
Octocat-spinner-32 configure.ac Bump versions up to 0.12.99 since a 0.12 release was just created. April 10, 2014
Octocat-spinner-32 debug.c Eliminate the deprecated mc_abort() function and MC_ABORT macro. March 22, 2014
Octocat-spinner-32 debug.h Eliminate the deprecated mc_abort() function and MC_ABORT macro. March 22, 2014
Octocat-spinner-32 json-c-uninstalled.pc.in Re-add the "json" pkg-config file as a compatibility shim. July 29, 2012
Octocat-spinner-32 json-c.pc.in Modify install names for library and include files April 05, 2012
Octocat-spinner-32 json-c.vcproj * printbuf.c - C. Watford (christopher dot watford at gmail dot com) March 13, 2007
Octocat-spinner-32 json.h Add a json_c_version.h header (included from json.h), and several mac… December 23, 2012
Octocat-spinner-32 json_c_version.c Add a json_c_version.h header (included from json.h), and several mac… December 23, 2012
Octocat-spinner-32 json_c_version.h Bump versions up to 0.12.99 since a 0.12 release was just created. April 10, 2014
Octocat-spinner-32 json_config.h.in Include json_inttypes.h in json_object.h since we use types like int3… February 15, 2012
Octocat-spinner-32 json_inttypes.h Fix the _MSC_VER check so it compiles on non-windows compilers. Issue#91 June 23, 2013
Octocat-spinner-32 json_object.c Issue#114: check for the presence of isnan and isinf, and provide com… March 02, 2014
Octocat-spinner-32 json_object.h Patch to address the following issues: April 09, 2014
Octocat-spinner-32 json_object_iterator.c Since we already use a local json_bool type, replace any stdbool.h us… April 24, 2012
Octocat-spinner-32 json_object_iterator.h Issue #76: use old style comment to allow json_object_iterator.h to b… April 30, 2013
Octocat-spinner-32 json_object_private.h Add a json_set_serializer() function to allow the string output of a … September 02, 2012
Octocat-spinner-32 json_tokener.c Patch to address the following issues: April 09, 2014
Octocat-spinner-32 json_tokener.h Patch to address the following issues: April 09, 2014
Octocat-spinner-32 json_util.c Update json_util August 13, 2013
Octocat-spinner-32 json_util.h Update json_util August 13, 2013
Octocat-spinner-32 libjson.c Add an autoconf test to test whether the .section .gnu<warning> September 09, 2012
Octocat-spinner-32 linkhash.c Patch to address the following issues: April 09, 2014
Octocat-spinner-32 linkhash.h Patch to address the following issues: April 09, 2014
Octocat-spinner-32 math_compat.h Issue #103: allow Infinity and -Infinity to be parsed. March 22, 2014
Octocat-spinner-32 printbuf.c Replaced #if HAVE_X with #ifdef HAVE_X as the former test is troublem… May 21, 2012
Octocat-spinner-32 printbuf.h Remove the "#undef PRINTBUF_DEBUG" from printbuf.h so it can be more … April 04, 2012
Octocat-spinner-32 random_seed.c Patch to address the following issues: April 09, 2014
Octocat-spinner-32 random_seed.h Patch to address the following issues: April 09, 2014
README
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 (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

Github repo for json-c:
  https://github.com/json-c/json-c

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

Then 

    $ ./configure
    $ make
    $ make install

To build and run the test programs run 

    $ 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
Something went wrong with that request. Please try again.