Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Official code repository for json-c. See the wiki for release tarballs for download.
C Shell HTML Other

Merge pull request #168 from bugness-chl/master

Tightening the number parsing algorithm
latest commit 68d856f618
@hawicz hawicz authored
Failed to load latest commit information.
tests Merge pull request #168 from bugness-chl/master
.gitignore Rename the "test_case" test to "test_charcase" to make it slightly le…
AUTHORS Add Jehiah and myself to the list of authors.
Android.configure.mk Add an Android-friendly build system
COPYING Add my copyright.
ChangeLog Bump versions up to 0.12.99 since a 0.12 release was just created.
Doxyfile Bump versions up to 0.12.99 since a 0.12 release was just created.
Makefile.am Patch to address the following issues:
Makefile.am.inc Patch to address the following issues:
NEWS Add a dummy "NEWS" file to automake doesn't complain.
README Add an empty README file to placate autoconf.
README-WIN32.html strndup is gone, remove it from the README file.
README.html Update README files with pointers to new github repo and googlegroups…
README.md Fix minor typo in README file.
RELEASE_CHECKLIST.txt Update the release checklist to include calculating the tarball check…
arraylist.c Slight style tweaks to the bsearch changest.
arraylist.h Slight style tweaks to the bsearch changest.
autogen.sh Default autogen.sh to not running configure, unless some command line…
bits.h Move the json_min() and json_max() macros to json_util.h and mark eve…
config.h.in Patch to address the following issues:
config.h.win32 Fixes #160 'missing header file on windows'
configure.ac Bump versions up to 0.12.99 since a 0.12 release was just created.
debug.c Remove trailing whitespace
debug.h Eliminate the deprecated mc_abort() function and MC_ABORT macro.
json-c-uninstalled.pc.in Re-add the "json" pkg-config file as a compatibility shim.
json-c.pc.in Modify install names for library and include files
json-c.vcproj Adds json_config.h.win32 to project. Adds VS2k13 project.
json-c.vcxproj Adds json_config.h.win32 to project. Adds VS2k13 project.
json-c.vcxproj.filters Adds json_config.h.win32 to project. Adds VS2k13 project.
json.h Move the json_min() and json_max() macros to json_util.h and mark eve…
json_c_version.c Add a json_c_version.h header (included from json.h), and several mac…
json_c_version.h Bump versions up to 0.12.99 since a 0.12 release was just created.
json_config.h.in Include json_inttypes.h in json_object.h since we use types like int3…
json_config.h.win32 Fixes #160 'missing header file on windows'
json_inttypes.h Fix the _MSC_VER check so it compiles on non-windows compilers. Issue#91
json_object.c Slight style tweaks to the bsearch changest.
json_object.h Slight style tweaks to the bsearch changest.
json_object_iterator.c Since we already use a local json_bool type, replace any stdbool.h us…
json_object_iterator.h Issue #76: use old style comment to allow json_object_iterator.h to b…
json_object_private.h Add a json_set_serializer() function to allow the string output of a …
json_tokener.c Merge pull request #168 from bugness-chl/master
json_tokener.h Remove trailing whitespace
json_util.c Introduce json_object_from_fd
json_util.h Introduce json_object_from_fd
libjson.c Remove trailing whitespace
linkhash.c Merge pull request #163 from sixlettervariables/fix-win32-build-problems
linkhash.h Remove trailing whitespace
math_compat.h Issue #103: allow Infinity and -Infinity to be parsed.
printbuf.c Move the json_min() and json_max() macros to json_util.h and mark eve…
printbuf.h Remove the "#undef PRINTBUF_DEBUG" from printbuf.h so it can be more …
random_seed.c Merge pull request #156 from jubalh/master
random_seed.h Patch to address the following issues:

README.md

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