Hi, I attached a sample Eclipse project to WINK-154 to demonstrate this:
https://issues.apache.org/jira/browse/WINK-154?
Hopefully that can be a launch point for getting to the right usage of
Jackson. I'm thinking we may just need to write our own provider or
perhaps we have to provide our own JaxbAnnotationIntrospector?
I confess I have not done a deep dive into this yet, but I will. I figured
it's worthwhile to summon the power of teamwork from the outset. :)
mike
From: Michael Rheinheimer/Austin/i...@ibmus
To: [email protected]
Date: 09/01/2009 01:11 PM
Subject: Jackson provider -- no support for @XmlAnyElement
Hi Team,
In an attempt to get Jackson
(http://wiki.fasterxml.com/JacksonInFiveMinutes) JAX-RS provider working, I
ran into a bit of a snag. The Jackson deserializer cannot handle fields
annotated with @XmlAnyElement. We use this in several places in a few
classes under org.apache.wink.common.model.atom (see AtomPerson, for
example).
Jackson cannot serialize XmlAnyElement, per the javadoc:
http://jackson.codehaus.org/1.2.0/javadoc/org/codehaus/jackson/xc/JaxbAnnotationIntrospector.html
So, what is the right course of action here? Jackson javadoc seems to
imply that XmlAnyElement is "not applicable" to JSON mapping. Our
implementation of Atom* implies otherwise. Do we want to claim support for
Jackson, but only when the JAXB objects being (de)serialized have no fields
annotated with XmlAnyElement (i.e. not Atom)? Do we have a fundamental
disagreement with Jackson's claim?
I briefly looked at adding custom (de)serializers to Jackson to support
XmlAnyElement, but I did not get very far. I wanted to float this issue to
get some opinions before spending too much time on it.
Any ideas or opinions?
Thanks..
mike