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

Bug 351588

Summary: JSON Unmarshal - support for namespaces
Product: z_Archived Reporter: Denise Smith <denise.mahar>
Component: EclipselinkAssignee: Denise Smith <denise.mahar>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: blaise.doughan, eclipselink.oxm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Proposed changes and tests
none
Updated support for users to supply a Map of prefix/uris
none
Updated support for users to supply a Map of prefix/uris
none
Updated support for users to supply a Map of prefix/uris
none
Updated support for users to supply a Map of prefix/uris
none
Update patch after review
none
Updated patch after review
none
Updated changes
none
Updated changes - test cases
none
Updated changed to make use of namespace prefix mapper code none

Description Denise Smith CLA 2011-07-08 11:04:05 EDT
In JSON there is no concept of namespaces so if the meta-data has namespaces they will not get written to JSON during marshal.   During unmarshal we need a way to compare the meta-data to the fields based just on local name, ignoring the namespace.
Comment 1 Denise Smith CLA 2011-07-27 15:54:19 EDT
Created attachment 200473 [details]
Proposed changes and tests
Comment 2 Denise Smith CLA 2011-09-08 15:18:52 EDT
Created attachment 203021 [details]
Updated support for users to supply a Map of prefix/uris
Comment 3 Denise Smith CLA 2011-09-08 15:19:31 EDT
Created attachment 203022 [details]
Updated support for users to supply a Map of prefix/uris
Comment 4 Denise Smith CLA 2011-09-08 15:37:02 EDT
Created attachment 203023 [details]
Updated support for users to supply a Map of prefix/uris
Comment 5 Denise Smith CLA 2011-09-08 16:40:31 EDT
Created attachment 203032 [details]
Updated support for users to supply a Map of prefix/uris
Comment 6 Denise Smith CLA 2011-09-09 10:48:56 EDT
Created attachment 203066 [details]
Update patch after review
Comment 7 Denise Smith CLA 2011-09-09 13:57:33 EDT
Created attachment 203081 [details]
Updated patch after review
Comment 8 Denise Smith CLA 2012-02-09 15:54:59 EST
Created attachment 210824 [details]
Updated changes
Comment 9 Denise Smith CLA 2012-02-09 15:56:06 EST
Created attachment 210826 [details]
Updated changes - test cases
Comment 10 Denise Smith CLA 2012-02-14 13:28:12 EST
Created attachment 210997 [details]
Updated changed to make use of namespace prefix mapper code
Comment 11 Denise Smith CLA 2012-02-14 13:30:13 EST
Checked in support for marshal and unmarshal of namespaces in JSON.    To set unmarshal namespaces use:
 Map namespaces = new HashMap<String, String>();
 namespaces.put("namespace1", "ns1");
 namespaces.put("namespace2", "ns2");
 jsonUnmarshaller.setProperty(JAXBContext.JSON_NAMESPACE_PREFIX_MAPPER, namespaces);

And on the marshaller
jsonMarshaller.setProperty(JAXBContext.NAMESPACE_PREFIX_MAPPER, namespaces)
Comment 12 Eclipse Webmaster CLA 2022-06-09 10:05:33 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink