[
https://issues.apache.org/jira/browse/DTACLOUD-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ronelle Landy closed DTACLOUD-354.
----------------------------------
Closing this JIRA as fixed in Deltacloud commit version:
29a4ad3f242e634545ae78cf60c7aaeab037860d
If I recall correctly, Michal Fojtik mentioned that Tomas and team were happy
with the current JSON output. Also see DTACLOUD-329. If there are new/specific
issues with JSON, please open a new JIRA record.
> Inconsistent collection format in JSON responses
> ------------------------------------------------
>
> Key: DTACLOUD-354
> URL: https://issues.apache.org/jira/browse/DTACLOUD-354
> Project: DeltaCloud
> Issue Type: Bug
> Components: Server
> Reporter: Tomas Sedovic
> Assignee: Michal Fojtik
>
> Depending on the size of a Deltacloud resource collection (images, keys,
> actions, etc.) the JSON responses are not consistent.
> 0 images:
> Expected: {"images": []}
> Actual: {"images": null}
> 1 image:
> Expected: {"images": [{"id": "img1", "name": "Fedora 19", ...}]}
> Actual: {"images": {"image": {"id": "img1", "name": "Fedora 19", ...}}}
> more than 1 image:
> Expected: {"images": [{"id": "img1", "name": "Fedora 19", ...}, {"id":
> "img2", "name": "Fedora 18", ...}]}
> Actual: {"images": {"image": [{"id": "img1", "name": "Fedora 19", ...},
> {"id": "img2", "name": "Fedora 18", ...}]}}
> (note that even when Deltacloud does return an array, the array is under
> "images"/"image" which isn't really ideal semantically)
> The current situation make it difficult to write clients that consume the
> JSON API because each client has to check the response if it's
> null/hash/array before using the data.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira