2014-02-12 14:40 GMT+01:00 Sergey Beryozkin <[email protected]>:
> Hi
>
> This is possible with Jettison 1.3.5,


Thanks.
I'm working with Jettison 1.3.5 and it doesn't work , do you have any example ?


> but at CXF level it is supported starting from CXF 2.7.10, where you can do
>
> jsonProviderp.setIgnoreEmptyArrayValues(true);
>

CXF 2.7.10 ? I thought the last 2.7.x release was 2.7.8


Regards




>
>
> On 12/02/14 11:37, Jose María Zaragoza wrote:
>>
>> Hello:
>>
>> I'm using Apache CXF 2.7.3 and Jettison provider 1.3.5 to return JSON
>> messages
>>
>> I would like to be able to return empty arrays, like
>>
>>   {"products":[] }
>>
>> but I only could return
>>
>> { "products":[""] }
>>
>> I tried with the next JAXB annotations
>>
>> @XmlElementWrapper(required = true)
>> protected List<String> products;
>>
>> @XmlElement(required = true)
>> protected List<String> products;
>>
>> @XmlElement(nillable = true)
>> protected List<String> products;
>>
>>
>> @XmlElementWrapper(nillable = true)
>> and returns
>>
>> {"products":[{"@xsi.nil":"true"}] }
>>
>>
>> I only have got to return { "products":[""] }
>>
>>
>> Any ideas ?
>>
>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
> Blog: http://sberyozkin.blogspot.com

Reply via email to