cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] [Comment Edited] (CXF-5072) Add capability in Jettison to default the namespace
Date Fri, 07 Jun 2013 20:06:20 GMT


Sergey Beryozkin edited comment on CXF-5072 at 6/7/13 8:04 PM:



,"user.username":"fred","user.first-name":"Fred", "user.last-name":"Person"}}"

work both ways for you ? 

I honestly do not think we can do the preferred solution unless User bean is qualified such
that only a top level element is qualified and its properties like "username", "first-name"
have unqualified elements.

      was (Author: sergey_beryozkin):
    I honestly do not think we can do the preferred solution.


,"user.username":"fred","user.first-name":"Fred", "user.last-name":"Person"}}"

work both ways for you ? 
> Add capability in Jettison to default the namespace
> ---------------------------------------------------
>                 Key: CXF-5072
>                 URL:
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS, JAXB Databinding
>    Affects Versions: 2.5.2
>            Reporter: Tom Stark
>         Attachments:
> When using Jettison, it would be preferable to configure Jettison to allow for the namespace
to be the same as what was last used.  For example, attached is a simple user object that
has a long namespace name.  I can use Jettison to alias the namespace to something shorter
but I still need to fully-qualify all members of the user object in JSON for Jettison to properly
marshal all of the fields to the java object.
> For example:
> {"user.user":{"user-role.user-role":{"":"admin"},"user.username":"fred","user.first-name":"Fred",
> What is preferable is:
> {"user.user":{"user-role.user-role":{"name":"admin"},"username":"fred","first-name":"Fred",
> In this case, the beginning of a new namespace is used for objects that need it.  After
the object is defined, the namespace reverts to the previous namespace.
> Output is fine since the "ignoreNamespace" strips all namespaces and the resulting JSON
> {"user":{"user-role":{"name":"admin"},"username":"fred","first-name":"Fred","last-name":"Person"}}
> Note that the attachments have been edited to remove proprietary information and probably
will not compile by themselves.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message