From: oetiker Date: Wed, 22 Feb 2012 22:11:18 +0000 (+0000) Subject: json requires keys to be proper strings and thus quoted ... X-Git-Url: https://git.tokkee.org/?p=rrdtool.git;a=commitdiff_plain;h=93d5c2793b2a3785230bc1f1f0ceb4b76c86939f json requires keys to be proper strings and thus quoted ... git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2276 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_tool.c b/src/rrd_tool.c index e481fa3..4dd4cae 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -743,7 +743,7 @@ int HandleInputLine( #define pXJV(indent,fmt,tag,value) \ if (json) { \ - printf(indent "%s: " fmt ",\n",tag,value); \ + printf(indent "\"%s\": " fmt ",\n",tag,value); \ } else { \ printf(indent "<%s>" fmt "\n",tag,value,tag); \ } @@ -757,7 +757,7 @@ int HandleInputLine( } if (json){ - printf(" %s: [\n", LEGEND_TAG); + printf(" \"%s\": [\n", LEGEND_TAG); } else { printf(" <%s>\n", LEGEND_TAG); @@ -788,7 +788,7 @@ int HandleInputLine( } if (json){ - printf(" %s: [\n",DATA_TAG); + printf(" \"%s\": [\n",DATA_TAG); } else { printf(" <%s>\n", DATA_TAG); }