r18848: Save the json library before I start hacking on it. I'm going to be
[jra/samba/.git] / source4 / lib / json / test2.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4
5 #include "json.h"
6
7
8 int main(int argc, char **argv)
9 {
10   struct json_object *new_obj;
11
12   mc_set_debug(1);
13
14   new_obj = json_tokener_parse("/* more difficult test case */ { \"glossary\": { \"title\": \"example glossary\", \"GlossDiv\": { \"title\": \"S\", \"GlossList\": [ { \"ID\": \"SGML\", \"SortAs\": \"SGML\", \"GlossTerm\": \"Standard Generalized Markup Language\", \"Acronym\": \"SGML\", \"Abbrev\": \"ISO 8879:1986\", \"GlossDef\": \"A meta-markup language, used to create markup languages such as DocBook.\", \"GlossSeeAlso\": [\"GML\", \"XML\", \"markup\"] } ] } } }");
15   printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
16   json_object_put(new_obj);
17
18   return 0;
19 }