[ 
https://issues.apache.org/jira/browse/CXF-3483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028275#comment-13028275
 ] 

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: https://issues.apache.org/jira/browse/CXF-3483
>             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:
>   http://jira.codehaus.org/browse/JETTISON-2
> org.apache.cxf.jaxrs.provider.JSONProvider should also expose this property.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to