| Summary: | JSON - No root element handling | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Denise Smith <denise.mahar> | ||||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | eclipselink.oxm-inbox | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows 7 | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 200943 [details]
Proposed changes and tests
Checked changes in to trunk. Behavior as described in the bug. Created attachment 204317 [details]
Updated INCLUDE_ROOT option
Created attachment 204321 [details]
Update - INCLUDE_ROOT option
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
In JSON a document can look like this {"address" {"street":"theStreet", "city":"theCity" } } Or it can exist with no root (in this case no "address") {"street":"theStreet", "city":"theCity" } We need to be able to unmarshal this. Since we'll need to provide the class to unmarshal to the object returned will be a JAXBElement (see that JAXBUnmarshaller.unmarshal(Source) returns a JAXBElement). In this case the QName on the JAXBElement will have an "" local name. In the marshal case if a QName on a JAXBElement has an "" local name we will treat it as not having a root element.