blob: 5f95565982170e89308c47bbf8a251b4c15a70c9 [file] [log] [blame]
Michael Clarkf0d08882007-03-13 08:26:18 +00001#include <stdio.h>
2#include <stdlib.h>
Michael Clarkc8f4a6e2007-12-07 02:44:24 +00003#include <stddef.h>
Michael Clarkf0d08882007-03-13 08:26:18 +00004#include <string.h>
5
6#include "json.h"
7
8
9int main(int argc, char **argv)
10{
Michael Clarkaaec1ef2009-02-25 02:31:32 +000011 json_object *new_obj;
Michael Clarkf0d08882007-03-13 08:26:18 +000012
Michael Clarkdfaf6702007-10-25 02:26:00 +000013 MC_SET_DEBUG(1);
Michael Clarkf0d08882007-03-13 08:26:18 +000014
15 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\"] } ] } } }");
16 printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
17 json_object_put(new_obj);
18
19 return 0;
20}