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/?a=commitdiff_plain;h=b818ae868581fa1d1dae5998e5c82ee81f309b10;p=rrdtool.git json requires keys to be proper strings and thus quoted ... git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4/program@2276 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_tool.c b/src/rrd_tool.c index 187b3e3..5a37016 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); }