test2.c
Go to the documentation of this file.
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  argc = 0; argv = (char**)0;
11  struct json_object *new_obj;
12 
13  mc_set_debug(1);
14 
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 }
int main(int argc, char **argv)
Definition: test2.c:8
void json_object_put(struct json_object *this)
Definition: json_object.c:144
const char * json_object_to_json_string(struct json_object *this)
Definition: json_object.c:199
void mc_set_debug(int debug)
Definition: debug.c:36
struct json_object * json_tokener_parse(const char *str)
Definition: json_tokener.c:92


csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23