Remove json_type enum trailing comma
1 file changed
tree: 2b11d3b65c2397cdd042822dc00d1a265a9a8997
  1. tests/
  2. .gitignore
  3. Android.configure.mk
  4. arraylist.c
  5. arraylist.h
  6. AUTHORS
  7. autogen.sh
  8. bits.h
  9. ChangeLog
  10. config.h.in
  11. config.h.win32
  12. configure.ac
  13. COPYING
  14. debug.c
  15. debug.h
  16. Doxyfile
  17. json-c-uninstalled.pc.in
  18. json-c.pc.in
  19. json-c.vcproj
  20. json.h
  21. json_c_version.c
  22. json_c_version.h
  23. json_config.h.in
  24. json_inttypes.h
  25. json_object.c
  26. json_object.h
  27. json_object_iterator.c
  28. json_object_iterator.h
  29. json_object_private.h
  30. json_tokener.c
  31. json_tokener.h
  32. json_util.c
  33. json_util.h
  34. libjson.c
  35. linkhash.c
  36. linkhash.h
  37. Makefile.am
  38. Makefile.am.inc
  39. math_compat.h
  40. NEWS
  41. printbuf.c
  42. printbuf.h
  43. random_seed.c
  44. random_seed.h
  45. README
  46. README-WIN32.html
  47. README.html
  48. README.md
  49. RELEASE_CHECKLIST.txt
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