[GRASS-SVN] r74149 - grass/trunk/general/g.parser

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Mar 3 15:17:20 PST 2019


Author: neteler
Date: 2019-03-03 15:17:20 -0800 (Sun, 03 Mar 2019)
New Revision: 74149

Modified:
   grass/trunk/general/g.parser/g.parser.html
Log:
g.parser manual: explain --json output, useful for REST API

Modified: grass/trunk/general/g.parser/g.parser.html
===================================================================
--- grass/trunk/general/g.parser/g.parser.html	2019-03-03 22:26:42 UTC (rev 74148)
+++ grass/trunk/general/g.parser/g.parser.html	2019-03-03 23:17:20 UTC (rev 74149)
@@ -255,6 +255,31 @@
 v.in.db --interface-description
 </pre></div>
 
+<h2>JSON</h2>
+
+The flag <b>--json</b> added to a GRASS command with parameters mandatorily
+to be specified generates a module interface description in JSON. Example:
+
+<div class="code"><pre>
+v.in.db driver=sqlite database=mysqlite.db table=pointsfile x=x y=y z=z key=idcol out=dtmpoints --json
+{
+  "module": "v.in.db",
+  "id": "v.in.db_1804289383",
+  "inputs":[
+     {"param": "table", "value": "pointsfile"},
+     {"param": "driver", "value": "sqlite"},
+     {"param": "database", "value": "mysqlite.db"},
+     {"param": "x", "value": "x"},
+     {"param": "y", "value": "y"},
+     {"param": "z", "value": "z"},
+     {"param": "key", "value": "idcol"}
+   ],
+  "outputs":[
+     {"param": "output", "value": "dtmpoints"}
+   ]
+}
+</pre></div>
+
 <h2>Web Processing Service (WPS)</h2>
 
 The flag <b>--wps-process-description</b> added to a GRASS command



More information about the grass-commit mailing list