summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a127c31)
raw | patch | inline | side by side (parent: a127c31)
author | Florian Forster <octo@verplant.org> | |
Tue, 4 Dec 2012 13:01:00 +0000 (14:01 +0100) | ||
committer | Florian Forster <octo@verplant.org> | |
Tue, 4 Dec 2012 13:01:00 +0000 (14:01 +0100) |
src/graph.c | patch | blob | history |
diff --git a/src/graph.c b/src/graph.c
index 713d45f92c2b8c984da9ec309bbdd832e0904697..544a606d80cf06b1d2d728650e5cde56e6cf74ed 100644 (file)
--- a/src/graph.c
+++ b/src/graph.c
return (EINVAL);
yajl_gen_map_open (handler);
+
+ yajl_gen_string (handler,
+ (unsigned char *) "title",
+ (unsigned int) strlen ("title"));
+ yajl_gen_string (handler,
+ (unsigned char *) cfg->title,
+ (unsigned int) strlen (cfg->title));
+
yajl_gen_string (handler,
(unsigned char *) "select",
(unsigned int) strlen ("select"));
ident_to_json (cfg->select, handler);
+
yajl_gen_string (handler,
(unsigned char *) "instances",
(unsigned int) strlen ("instances"));
for (i = 0; i < cfg->instances_num; i++)
inst_to_json (cfg->instances[i], handler);
yajl_gen_array_close (handler);
+
yajl_gen_map_close (handler);
return (0);