[GRASS-SVN] r62654 - grass/trunk/vector/v.what

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Nov 7 07:13:18 PST 2014


Author: mmetz
Date: 2014-11-07 07:13:18 -0800 (Fri, 07 Nov 2014)
New Revision: 62654

Modified:
   grass/trunk/vector/v.what/what.c
Log:
v.what: fix json output

Modified: grass/trunk/vector/v.what/what.c
===================================================================
--- grass/trunk/vector/v.what/what.c	2014-11-07 13:56:44 UTC (rev 62653)
+++ grass/trunk/vector/v.what/what.c	2014-11-07 15:13:18 UTC (rev 62654)
@@ -179,9 +179,10 @@
 		    fprintf(stdout, "East=%s\nNorth=%s\n", east_buf,
 			    north_buf);
 		}
-		else if (json){
-		    fprintf(stdout, "{\"Coordinates\": {\"East\": %s, \"North\": %s}", east_buf,
-			    north_buf);}
+		else if (json) {
+		    fprintf(stdout, "{\"Coordinates\": {\"East\": \"%s\", \"North\": \"%s\"}",
+			    east_buf, north_buf);
+		}
 		else {
 		    fprintf(stdout, "East: %s\nNorth: %s\n", east_buf,
 			    north_buf);
@@ -346,7 +347,6 @@
 			}
 		    }
 		}
-
 	    }
 	    else {
 		if (script) {



More information about the grass-commit mailing list