On Monday 13 December 2010 9:26:19 pm Wong wrote: > Hi, > > I ran into the problem listed at: > http://cxf.apache.org/docs/jax-rs.html#JAX-RS-DealingwithJSONarrayserializa > tionissues > > Is it necessary to set the arrayKeys list for the this to work?
Yes. > Can I get > all lists of size 1 to serialize properly? Not without the arrayKeys set. The basic reason is that we just feed the JAXB marshaller an XMLStreamWriter that happens to output JSON. The writers have no idea what they are writing. They just get events like startElement and such. For any given startElement, it needs to know if it should output it as a json array or not. It's not something JAXB provides to the writer. -- Daniel Kulp [email protected] http://dankulp.com/blog
