[Geoserver-devel] [JIRA] (GEOS-7859) Empty list of items is returned as empty string in JSON-encoded REST

Damiano Albani created an issue

GeoServer / BugGEOS-7859

Empty list of items is returned as empty string in JSON-encoded REST

Issue Type:

BugBug

Assignee:

Unassigned

Components:

REST

Created:

16/Nov/16 10:29 PM

Priority:

LowLow

Reporter:

Damiano Albani

Empty lists of items are not correctly serialized in REST responses encoded as JSON.

For example, create a workspace named “empty” and call:

$ curl -s -u admin:geoserver http://localhost:8080/geoserver/rest/workspaces/empty/datastores.json

The response is:

{"dataStores":""}

Whereas it should probably be:

{"dataStores":[]}

To be compared to XML encoding:

$ curl -s -u admin:geoserver http://localhost:8080/geoserver/rest/workspaces/empty/datastores.xml

<dataStores/>

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.552.1#100018-sha1:c06db68)

Atlassian logo