Hi
This is possible with Jettison 1.3.5, but at CXF level it is supported
starting from CXF 2.7.10, where you can do
jsonProviderp.setIgnoreEmptyArrayValues(true);
Cheers, Sergey
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