a fast json library for C
C M4 Shell C++ Makefile
Latest commit d056c33 Dec 2, 2016 @rgerhards rgerhards committed on GitHub Merge pull request #131 from rgerhards/refactor-json-print-printbuf
WiP: Refactoring of new json_print and printbuf subsystem
Permalink
Failed to load latest commit information.
CI travis: automatically check code style Apr 28, 2016
autoconf-archive add atomic instruction abstraction layer Dec 16, 2015
m4 m4: fix detection of atomics Jul 10, 2016
tests testbench: add test for floating point representation Nov 26, 2016
.gitignore added config.h.in to the .gitignore list Nov 1, 2016
.travis.yml travis: automatically check code style Apr 28, 2016
AUTHORS fork to libfastjson Nov 18, 2015
CONTRIBUTING.md doc: minimal doc of contribution rules Nov 5, 2016
COPYING add my copyright Nov 18, 2015
ChangeLog maintain ChangeLog Nov 30, 2016
DIFFERENCES remove [f]json_object_get_object() API Apr 9, 2016
Doxyfile Bump versions up to 0.12.99 since a 0.12 release was just created. Apr 11, 2014
Makefile.am added json_print to the makefile Nov 1, 2016
NEWS Add a dummy "NEWS" file to automake doesn't complain. May 3, 2011
README Add an empty README file to placate autoconf. Apr 20, 2014
README.html Drop Android and Windows specific bits Apr 6, 2016
README.md fix invalid instructions in README Apr 30, 2016
RELEASE_CHECKLIST.txt Drop Android and Windows specific bits Apr 6, 2016
arraylist.c AIX port for libfastjson Nov 10, 2016
arraylist.h fix indention in header files Apr 11, 2016
atomic.h codestyle: adjust trailing white space Nov 10, 2016
autogen.sh maintain ChangeLog Dec 16, 2015
configure.ac AIX port for libfastjson Nov 10, 2016
debug.c fix indention in some more uncritical files Apr 11, 2016
debug.h cleanup: remove old RSCS checkout header comments Apr 7, 2016
json.h fix incomplete backward compatibility layer Apr 29, 2016
json_object.c remove redundancy in json_print subsystem Dec 1, 2016
json_object.h Merge pull request #120 from CopernicaMarketingSoftware/master Nov 30, 2016
json_object_iterator.c Follow-up to d4b3a2d: fix tautology comparison in fjson_object_iter_e… Jul 13, 2016
json_object_iterator.h PoC: replace hash tables by arrays Apr 11, 2016
json_object_private.h array subobject: implement overwriting keys and reusing deleted space Apr 12, 2016
json_print.c remove redundancy in json_print subsystem Dec 1, 2016
json_tokener.c AIX port for libfastjson Nov 10, 2016
json_tokener.h fix indention in header files Apr 11, 2016
json_util.c replace json_inttypes.h by stdint.h Apr 28, 2016
json_util.h cleanup: remove old RSCS checkout header comments Apr 7, 2016
json_version.c builds cleanly under clang with AX_COMPILER_FLAGS Apr 9, 2016
libfastjson-uninstalled.pc.in nameing adaptions after forking Nov 18, 2015
libfastjson.pc.in nameing adaptions after forking Nov 18, 2015
printbuf.c AIX port for libfastjson Nov 10, 2016
printbuf.h fix indention in header files Apr 11, 2016

README.md

libfastjson

NOTE: libfastjson is a fork from json-c, and is currently under development.

The aim of this project is not to provide a slightly modified clone of json-c. It's aim is to provide

  • a small library with essential json handling functions
  • sufficiently good json support (not 100% standards compliant)
  • be very fast in processing

In order to reach these goals, we reduce the features of json-c. For similarities and differences, see the file DIFFERENCES.

IMPORTANT The current API is not stable and will change until version 1.0.0 is reached. We plan to reach it by summer 2016 at latest. With 1.0.0, the API will be stable. Until then, everything may change. Of course, we will not deliberatly break things but we need freedom to restructure.

Building on Unix with git, gcc and autotools

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.

libfastjson GitHub repo: https://github.com/rsyslog/libfastjson

$ git clone https://github.com/rsyslog/libfastjson.git
$ cd libfastjson
$ sh autogen.sh

followed by

$ ./configure
$ make
$ make install

To build and run the test programs:

$ make check

Linking to libfastjson

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

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

Without pkgconfig, you would do something like this:

LIBFASTJSON_DIR=/path/to/json_c/install
CFLAGS += -I$(LIBFASTJSON_DIR)/include/libfastjson
LDFLAGS+= -L$(LIBFASTJSON_DIR)/lib -lfastjson