From b818ae868581fa1d1dae5998e5c82ee81f309b10 Mon Sep 17 00:00:00 2001 From: oetiker Date: Wed, 22 Feb 2012 22:11:18 +0000 Subject: [PATCH] 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 --- src/rrd_tool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } -- 2.30.2