Bug 867950 - Inconsistencies of element names in JSON and XML representation
Summary: Inconsistencies of element names in JSON and XML representation
Keywords:
Status: CLOSED DUPLICATE of bug 652883
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Michael Pasternak
QA Contact: Oded Ramraz
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-18 16:20 UTC by Gal Leibovici
Modified: 2016-02-10 19:25 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-20 12:26:12 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:
dyasny: Triaged+


Attachments (Terms of Use)
Actual response (32.42 KB, application/json)
2012-10-18 16:20 UTC, Gal Leibovici
no flags Details
JSON dump that should be close to the expected response (37.43 KB, application/json)
2012-10-18 16:20 UTC, Gal Leibovici
no flags Details

Description Gal Leibovici 2012-10-18 16:20:08 UTC
Created attachment 629549 [details]
Actual response

Description of problem:
There are inconsistencies between some names of elements in JSON representation and XML representation.
For example, under /api/capabilities, we have the <power_managers> object, which has <power_management> sub object.
You would expect in JSON to have a "powerManagers" option which has an array called "powerManagements", but instead the array is named "powerManagers" as well.

I am attaching the response I have and a JSON dump of the parsed XML object, which should be similar to how the response should be like if it was consistent with XML names.

Comment 1 Gal Leibovici 2012-10-18 16:20:53 UTC
Created attachment 629550 [details]
JSON dump that should be close to the expected response

Comment 2 Oded Ramraz 2012-10-18 18:52:52 UTC
This bug currently blocks our JSON format support automation.

Comment 4 Michael Pasternak 2012-10-21 07:26:17 UTC
the problem for facing naming-convention issues in json cause jaxb using xmlelement field names, while json-provider actual field names, what is creating
naming inconsistency between xml and json representations,

(there is workaround using another provider, but it has own issues, it produces
output that cannot be used as is when send it back to the server).

Comment 11 Michael Pasternak 2013-02-20 12:26:12 UTC

*** This bug has been marked as a duplicate of bug 652883 ***


Note You need to log in before you can comment on or make changes to this bug.