Browse Source

g.parser manual: explain --json output, useful for REST API

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74149 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 6 years ago
parent
commit
669efe2e6b
1 changed files with 25 additions and 0 deletions
  1. 25 0
      general/g.parser/g.parser.html

+ 25 - 0
general/g.parser/g.parser.html

@@ -255,6 +255,31 @@ generates a related help page template in XML. Example:
 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