deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Fojtik (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DTACLOUD-354) Inconsistent collection format in JSON responses
Date Thu, 03 Jan 2013 13:20:14 GMT

     [ https://issues.apache.org/jira/browse/DTACLOUD-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michal Fojtik resolved DTACLOUD-354.
------------------------------------

    Resolution: Fixed
      Assignee: Michal Fojtik
    
> 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

Mime
View raw message