| Summary: | Object to JSON Support | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Blaise Doughan <blaise.doughan> | ||||||||||||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||||||
| Severity: | normal | ||||||||||||||||||
| Priority: | P2 | CC: | denise.mahar, eclipselink.oxm-inbox, michael.f.obrien | ||||||||||||||||
| Version: | unspecified | ||||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||
| Hardware: | PC | ||||||||||||||||||
| OS: | Windows XP | ||||||||||||||||||
| Whiteboard: | |||||||||||||||||||
| Bug Depends on: | 350485, 351113, 351119, 351371, 356826, 371919 | ||||||||||||||||||
| Bug Blocks: | |||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
Created attachment 200608 [details]
Test cases and a few small changes
Created attachment 201146 [details]
Test cases and another small change
Created attachment 202169 [details]
Support mediatype as JAXBContext property
Created attachment 202171 [details]
Support mediatype as JAXBContext property
Created attachment 206430 [details]
New test cases and minor changes
Created attachment 209846 [details]
More test cases
Created attachment 216075 [details]
Additional testing
Support for object to JSON has been added to eclipselink 2.4 The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
Add support for converting objects to/from JSON using JAXB & MOXy metadata. JAXBContext jc = JAXBContext.newInstance(Customer.class); Unmarshaller unmarshaller = jc.createUnmarshaller(); unmarshaller.setProperty("eclipselink.media.type", "application/json"); File json = new File("src/demo/json/input.json"); Customer customer = (Customer) unmarshaller.unmarshal(json); Marshaller marshaller = jc.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); marshaller.setProperty("eclipselink.media.type", "application/json"); marshaller.marshal(customer, System.out);