diff options
Diffstat (limited to '')
-rw-r--r-- | test/json.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/json.c b/test/json.c new file mode 100644 index 0000000..6671628 --- /dev/null +++ b/test/json.c @@ -0,0 +1,15 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <json.c> +int main (int argc, char ** argv) { + struct dc_json * handler = calloc(1, sizeof(struct dc_json)); + char * o; + for (int i = 1; i < argc; i++) + if ((o = dc_json(handler, argv[i]))) { + printf("%s\n", o); + while ((o = dc_json(handler, ""))) + printf("%s\n", o); + } + dc_json_free(handler); +} |