"yes, this should work and it should work even for inheritance structures,
i.e. ChildBean extends ParentBean scenarios, where you serialize ParentBean
containing ChildBean instance, but then you
need to preserve the "root tag" JSON equivalent (rootUnwrapping==false) and
sometimes
you need to support namespaces."
Hi Jakub,
Does this mean that setting rootUnwrapping==true won't work for JSON
unmarshalling? and is this expected behavior?
It does seem like unmarshalling should expect to work as this link suggest
it should work without the XmlRootElement.
http://jaxb.java.net/guide/_XmlRootElement_and_unmarshalling.html
"However, sometimes you may need to unmarshal an instance of a type that
does not have an XmlRootElement . For example, you might dynamically find
out at the runtime that a certain element has a certain type. For example,
the following document illustrates an XML instance where the content of
<someOtherTagName> element is represented by the Foo class. "
Thanks
Charles
--
View this message in context: http://jersey.576304.n2.nabble.com/Unmarshalled-JSON-not-populating-original-class-is-was-marshalled-from-tp4256111p6538878.html
Sent from the Jersey mailing list archive at Nabble.com.