[Jersey] Re: JSON / XML unmarshaller problem

From: Jakub Podlesak <>
Date: Fri, 29 Apr 2011 12:08:51 +0200

Hi Jairo,

FEATURE_POJO_MAPPING simply allows you to do JSON processing
with all Java objects. It is not restricted to JAXB beans only, as opposed
to the default Jersey JSON approach (maintained just for backwards
compatibility reason).

I guess you happen to use only JAXB beans, and then you do not see
the need to use the above feature. On the other hand, if you look
at the JSON generated using different methods (the FEATURE_POJO_MAPPING
feature switched on/off, different Jersey JSON notations), you might see
some differences. You may want to check [1] for some more detailed

Anyway, i would strongly recommend using the Jackson based
FEATURE_POJO_MAPPING feature in Jersey even for JAXB beans,
for it's truly natural Java<->JSON mapping.




On 04/14/2011 03:45 PM, Jairo1 wrote:
> My question 2. is partially answered:
> I removed class from my JBuilder project and added proper
> 'namespace' to MyClass bean.
> This solved my problem with receiveing/unmarshalling correct XML and JSON
> data to my REST client.
> After this change FEATURE_POJO_MAPPING is not necessary to deserialize JSON
> data in JBuilder client.
> But issues asked in 1. and 3. are still mysteries for me.
> 1.It seems that FEATURE_POJO_MAPPING configuration is not needed in all
> cases. So when this is required?
> 2.JBuilder2006 doesn't accept annotation for
> 3.It seems the problem was uncompiled in JBuilder2006.
> But why JSON format unmarshalled the data and XML approach not for incorrect
> --
> View this message in context:
> Sent from the Jersey mailing list archive at