Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350483

Summary: Object to JSON Support
Product: z_Archived Reporter: Blaise Doughan <blaise.doughan>
Component: EclipselinkAssignee: 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:
Description Flags
Test cases and a few small changes
none
Test cases and another small change
none
Support mediatype as JAXBContext property
none
Support mediatype as JAXBContext property
none
New test cases and minor changes
none
More test cases
none
Additional testing none

Description Blaise Doughan CLA 2011-06-27 14:38:21 EDT
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);
Comment 1 Denise Smith CLA 2011-07-29 12:53:58 EDT
Created attachment 200608 [details]
Test cases and a few small changes
Comment 2 Denise Smith CLA 2011-08-09 09:57:15 EDT
Created attachment 201146 [details]
Test cases and another small change
Comment 3 Denise Smith CLA 2011-08-25 13:23:16 EDT
Created attachment 202169 [details]
Support mediatype as JAXBContext property
Comment 4 Denise Smith CLA 2011-08-25 14:28:41 EDT
Created attachment 202171 [details]
Support mediatype as JAXBContext property
Comment 5 Denise Smith CLA 2011-11-03 15:49:57 EDT
Created attachment 206430 [details]
New test cases and minor changes
Comment 6 Denise Smith CLA 2012-01-20 14:09:06 EST
Created attachment 209846 [details]
More test cases
Comment 7 Denise Smith CLA 2012-05-22 16:34:56 EDT
Created attachment 216075 [details]
Additional testing
Comment 8 Denise Smith CLA 2012-05-28 08:59:02 EDT
Support for object to JSON has been added to eclipselink 2.4
Comment 9 Eclipse Webmaster CLA 2022-06-09 10:27:59 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink