yes, there is:
http://cxf.apache.org/docs/jax-rs-data-bindings.html#JAX-RSDataBindings-DealingwithJSONarrayserializationissues
which in real life looks like e.g.:
<jaxrs:server id="restClientServer" address="/rest">
...
<jaxrs:providers>
<ref bean="jsonProvider" />
</jaxrs:providers>
</jaxrs:server>
<bean id="jsonProvider"
class="org.apache.cxf.jaxrs.provider.json.JSONProvider">
<property name="serializeAsArray" value="true"/>
<property name="arrayKeys">
<list>
<!-- mention here every WS object property (XmlElement name that is
covered in XmlWrapperElement) that has to be always serialized as array -->
<value>item</value>
<value>child</value>
</list>
</property>
</bean>
--
S pozdravom
Ladislav Lenčucha
[email protected]
On Thu, Dec 6, 2012 at 2:42 AM, KARR, DAVID <[email protected]> wrote:
> I have a colleague who complained to me about CXF's JSON handling. He
> said that he couldn't figure out how to force CXF's JSON handling to render
> a JSON array for a one-element collection. It was rendering it as a plain
> field. I haven't looked into this, but is there an obvious way to deal
> with this?
>