Bug 867950 - Inconsistencies of element names in JSON and XML representation
Inconsistencies of element names in JSON and XML representation
Status: CLOSED DUPLICATE of bug 652883
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Michael Pasternak
Oded Ramraz
infra
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-18 12:20 EDT by Gal Leibovici
Modified: 2016-02-10 14:25 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-20 07:26:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
dyasny: Triaged+


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

  None (edit)
Description Gal Leibovici 2012-10-18 12:20:08 EDT
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 12:20:53 EDT
Created attachment 629550 [details]
JSON dump that should be close to the expected response
Comment 2 Oded Ramraz 2012-10-18 14:52:52 EDT
This bug currently blocks our JSON format support automation.
Comment 4 Michael Pasternak 2012-10-21 03:26:17 EDT
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 07:26:12 EST

*** 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.