README.md
1libfastjson
2===========
3**NOTE: libfastjson is a fork from json-c, and is currently under development.**
4
5The aim of this project is **not** to provide a slightly modified clone
6of json-c. It's aim is to provide
7
8* a **small** library with essential json handling functions
9* sufficiently good json support (not 100% standards compliant)
10* be very fast in processing
11
12In order to reach these goals, we reduce the features of json-c. For
13similarities and differences, see the file DIFFERENCES.
14
15**IMPORTANT**
16The current API is **not** stable and will change until version 1.0.0 is
17reached. We plan to reach it by summer 2016 at latest. With 1.0.0, the API
18will be stable. Until then, everything may change. Of course, we will not
19deliberatly break things but we need freedom to restructure.
20
21
22Building on Unix with `git`, `gcc` and `autotools`
23--------------------------------------------------
24
25Prerequisites:
26
27 - `gcc`, `clang`, or another C compiler
28 - `libtool`
29
30If you're not using a release tarball, you'll also need:
31
32 - `autoconf` (`autoreconf`)
33 - `automake`
34
35Make sure you have a complete `libtool` install, including `libtoolize`.
36
37`libfastjson` GitHub repo: https://github.com/rsyslog/libfastjson
38
39```bash
40$ git clone https://github.com/rsyslog/libfastjson.git
41$ cd libfastjson
42$ sh autogen.sh
43```
44
45followed by
46
47```bash
48$ ./configure
49$ make
50$ make install
51```
52
53To build and run the test programs:
54
55```bash
56$ make check
57```
58
59Linking to `libfastjson`
60---------------------------
61
62If your system has `pkgconfig`,
63then you can just add this to your `makefile`:
64
65```make
66CFLAGS += $(shell pkg-config --cflags libfastjson)
67LDFLAGS += $(shell pkg-config --libs libfastjson)
68```
69
70Without `pkgconfig`, you would do something like this:
71
72```make
73LIBFASTJSON_DIR=/path/to/json_c/install
74CFLAGS += -I$(LIBFASTJSON_DIR)/include/libfastjson
75LDFLAGS+= -L$(LIBFASTJSON_DIR)/lib -lfastjson
76```
77