Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JSON data structures, parsing, generation in C.
C Other
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bm
debian
dtrace
examples
m4 @ 84c2d60
packaging
t
tools
.gitignore
.gitmodules
Makefile.am
README.git
README.md
TODO
VERSION
configure.ac
dot-astylerc
jd_array.c
jd_closure.c
jd_dtrace.d
jd_exception.c
jd_hash.c
jd_json.c
jd_magic.c
jd_map.c
jd_object.c
jd_path.c
jd_path.h
jd_pretty.h
jd_printf.c
jd_private.h
jd_string.c
jd_utf8.c
jd_utf8.h
jdtest.c
jsondata.c
jsondata.h
jsonpretty.c
setup.sh

README.md

JSON and JSONPath in C

libjsondata provides data structures with JSON semantics (dictionaries and arrays), JSON serialisation and efficient support for JSONPath:

http://goessner.net/articles/JsonPath/

Build

$ ./setup.sh && ./configure && make test

Install

$ sudo make install
$ sudo ldconfig

Getting started

/* hello.c */

#include <jd_pretty.h>

int main(void) {
  scope {
    jd_var *hello_world = jd_njv("{\"hello\":\"world\"}");
    jd_printf("The message is %lJ\n", hello_world);
  }
  return 0;
}
$ gcc -std=c99 -o hello -ljsondata hello.c 
$ ./hello 
The message is {
  "hello": "world"
}

Andy Armstrong, andy@hexten.net

Something went wrong with that request. Please try again.