users@jersey.java.net

[Jersey] Re: JAXB annotations are ignored while serializing to JSON

From: naresh <baliga_naresh_at_yahoo.com>
Date: Wed, 25 Mar 2015 13:26:54 -0700 (MST)

Problem solved. Issue was caused because I'd enabled the following feature:
register(EntityFilteringFeature.class)


Haven't debugged to see why it was affecting only XML responses and not
JSON.

But from what I could see, in JSON serialization, the object graph
determined that the List with the JAXB annotations was not a field to
process and would ignore it totally.

Again don't know the reason why, but for now I don't need that feature and
am happy to remove it and move on...12 hours later. Not sure why I had it
enabled in the first place.



--
View this message in context: http://jersey.576304.n2.nabble.com/JAXB-annotations-are-ignored-while-serializing-to-JSON-tp7583218p7583220.html
Sent from the Jersey mailing list archive at Nabble.com.