cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] [Commented] (CXF-3483) JSONProvider: Don't force attributes to have @ if users doesn't want them too
Date Tue, 03 May 2011 15:55:03 GMT


Sergey Beryozkin commented on CXF-3483:

When "attributesAsElements" property is used, JSONProvider does not set any properties on
Configuration, as per JETTISON-2 comments.
So I thought it could make a difference.

What makes me concerned is that you get a broken sequence if you use attributesAsElements.
Internally, a CXF specific STAX writer is constructed and attempts to make sure attributes
are reported to Jettison as elements. For some reasons that does not work in your case which
makes me think that JAXB reports write events differently when DTOs are used and it confuses
the CXF writer.

Can you please give me a favor and try using 'attributesAsElements' with a resource class
returning VehicleDTO only (as opposed to List<VehicleDTO>) ? and if you can provide
a test case (maven based or just a war) then it would be great

> JSONProvider: Don't force attributes to have @ if users doesn't want them too
> -----------------------------------------------------------------------------
>                 Key: CXF-3483
>                 URL:
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>    Affects Versions: 2.3.4
>            Reporter: Pat Turner
> Jettison provides a configuration option to omit the '@' from attributes:
>   org.codehaus.jettison.mapped.Configuration.setSupressAtAttributes(boolean)
>   see Jettison Jira:
> org.apache.cxf.jaxrs.provider.JSONProvider should also expose this property.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message