Hi all, I'm tring to override a sql layer on geoserver using rest interface (json).
My workflow is: 1. get the original json from geoserver 2. clone json using org.json java libs 3. override original metadata entry with the follow
[..] "metadata": { "entry": { "@key": "JDBC_VIRTUAL_TABLE", "virtualTable": { "sql": "select * from mytablelayer", "name": "mytablelayer", "escapeSql": false, "geometry": { "srid": 32633, "name": "shape", "type": "Geometry" }
} } }, [..] push it on geoserver using rest api. What I get is this error on geoserver:
com.thoughtworks.xstream.converters.ConversionException: Expected element name but found sql instead : Expected element name but found sql instead As defined on json.org:
An object is an unordered set of name/value pairs. An object begins with { (left brace) and ends with }
(right brace). Each name is followed by : (colon) and the name/value pairs are separated by , (comma). so why geoserver checks about keys order?
I tested it on geoserver 2.6.4 and 2.7.2 with same result.
Thanks for support.
|