Browse Source

v.what: fix json output

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62654 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 10 years ago
parent
commit
1cae49cec4
1 changed files with 4 additions and 4 deletions
  1. 4 4
      vector/v.what/what.c

+ 4 - 4
vector/v.what/what.c

@@ -179,9 +179,10 @@ void what(struct Map_info *Map, int nvects, char **vect, double east, double nor
 		    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 @@ void what(struct Map_info *Map, int nvects, char **vect, double east, double nor
 			}
 		    }
 		}
-
 	    }
 	    else {
 		if (script) {