users@jersey.java.net

Re: [Jersey] XmlTransient annotation not working

From: Tatu Saloranta <tsaloranta_at_gmail.com>
Date: Fri, 23 Apr 2010 01:57:34 -0700

On Fri, Apr 23, 2010 at 1:27 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
>
> On Apr 23, 2010, at 9:16 AM, Jakub Podlesak wrote:
>
>>
>> For JAXB based processors, that would be a bug. Do you see the property
>> generated also for XML output?
>>
>> Otherwise, if you are using the Jackson based procesor,
>> (just looking at the Jackson javadocs),
>> there should be a @JsonIgnore annotation available
>> for this purpose i guess.
>>
>
> I think Jackson supports some of the JAXB annotations, @XmlTransient might
> be one of them.

Yes, the only trick is that you have to explicitly add the call to
enable handling of these (see Jackson FAQ for how to do this); default
is to only check for Jackson annotations (why? mostly just to keep
dependency to jax-rs api optional)

-+ Tatu +-