i m using geoserver 2.1.3 i want to get the fields of layer from database http://[localhost]/geoserver/wfs?request=describeFeatureType&typename=topp:states this reurns me output in xml format how can i get it in json
The following request should work:
One solution to move from
JSON to use the yahoo YQL API. To familiarize you can use the YQL console (http://developer.yahoo.com/yql/console), and try a query like:
select * from xml where url = 'your xml describeFeatureType request'
json as response format.
The output formats listed in the documentation is for WFS GetFeature requests. Not for DescribeFeatureType.
If you look at
you can read that the DescribeFeatureType operation only supports the outputFormat
It's the same in newer versions of GeoServer as well. There are tools that can help you convert XML to JSON in almost every platform.