This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 350483 - Object to JSON Support
Summary: Object to JSON Support
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 350485 351113 351119 351371 356826 371919
Blocks:
  Show dependency tree
 
Reported: 2011-06-27 14:38 EDT by Blaise Doughan CLA
Modified: 2022-06-09 10:27 EDT (History)
3 users (show)

See Also:


Attachments
Test cases and a few small changes (37.42 KB, patch)
2011-07-29 12:53 EDT, Denise Smith CLA
no flags Details | Diff
Test cases and another small change (31.76 KB, patch)
2011-08-09 09:57 EDT, Denise Smith CLA
no flags Details | Diff
Support mediatype as JAXBContext property (30.94 KB, patch)
2011-08-25 13:23 EDT, Denise Smith CLA
no flags Details | Diff
Support mediatype as JAXBContext property (37.06 KB, patch)
2011-08-25 14:28 EDT, Denise Smith CLA
no flags Details | Diff
New test cases and minor changes (88.74 KB, patch)
2011-11-03 15:49 EDT, Denise Smith CLA
no flags Details | Diff
More test cases (92.81 KB, patch)
2012-01-20 14:09 EST, Denise Smith CLA
no flags Details | Diff
Additional testing (70.08 KB, patch)
2012-05-22 16:34 EDT, Denise Smith CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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