Inconsistent presentation of alternate styles in xml and json
-------------------------------------------------------------
Key: GEOS-4028
URL: http://jira.codehaus.org/browse/GEOS-4028
Project: GeoServer
Issue Type: Bug
Components: REST
Reporter: Andrea Aime
Assignee: Justin Deoliveira
Fix For: 2.0.3
Just had a quick chat with Andreas over an odd issue about alternate styles,
installed the rest config extension on demo.opengeo.org and indeed it seems the
alternate styles in json have an odd structure.
Here is the output of http://demo.opengeo.org/geoserver/rest/layers/states.xml:
{code:xml}
<layer>
<name>states</name>
<path>/</path>
<type>VECTOR</type>
<defaultStyle>
<name>population</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate"
href="http://demo.opengeo.org/geoserver/rest/styles/population.xml"
type="application/xml"/>
</defaultStyle>
<styles>
<style>
<name>usflags</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate"
href="http://demo.opengeo.org/geoserver/rest/styles/usflags.xml"
type="application/xml"/>
</style>
<style>
<name>polygon</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate"
href="http://demo.opengeo.org/geoserver/rest/styles/polygon.xml"
type="application/xml"/>
</style>
</styles>
<resource class="featureType">
<name>states</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate"
href="http://demo.opengeo.org/geoserver/rest/workspaces/topp/datastores/states_shapefile/featuretypes/states.xml"
type="application/xml"/>
</resource>
<enabled>true</enabled>
<attribution>
<logoWidth>0</logoWidth>
<logoHeight>0</logoHeight>
</attribution>
</layer>
{code}
And here is the json version instead (pretty printed courtesy of
http://jsonformatter.curiousconcept.com/):
{code:json}
{
"layer":{
"name":"states",
"path":"/",
"type":"VECTOR",
"defaultStyle":{
"name":"population",
"href":"http://demo.opengeo.org/geoserver/rest/styles/population.json"
},
"styles":{
"style":[
{
"name":"usflags",
"href":"http://demo.opengeo.org/geoserver/rest/styles/usflags.json"
},
{
"name":"polygon",
"href":"http://demo.opengeo.org/geoserver/rest/styles/polygon.json"
}
]
},
"resource":{
"@class":"featureType",
"name":"states",
"href":"http://demo.opengeo.org/geoserver/rest/workspaces/topp/datastores/states_shapefile/featuretypes/states.json"
},
"enabled":true,
"attribution":{
"logoWidth":0,
"logoHeight":0
}
}
}
{code}
See how it looks? Styles -> style -> array of styles ... hmmm....
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel