Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Official code repository for json-c. See the wiki for release tarballs for download.
C Shell HTML Makefile

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
tests
.gitignore
AUTHORS
Android.configure.mk
COPYING
ChangeLog
Doxyfile
INSTALL
Makefile.am
Makefile.am.inc
NEWS
README
README-WIN32.html
README.html
RELEASE_CHECKLIST.txt
arraylist.c
arraylist.h
autogen.sh
bits.h
config.h.in
config.h.win32
configure.in
debug.c
debug.h
json-c-uninstalled.pc.in
json-c.pc.in
json-c.vcproj
json.h
json.pc.in
json_config.h.in
json_inttypes.h
json_object.c
json_object.h
json_object_iterator.c
json_object_iterator.h
json_object_private.h
json_tokener.c
json_tokener.h
json_util.c
json_util.h
libjson.c
linkhash.c
linkhash.h
printbuf.c
printbuf.h

README

Building on Unix with git, gcc and autotools

Home page for json-c:
  http://oss.metaparadigm.com/json-c/

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

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.