2014-02-27 16:05 GMT+01:00 Andrew Clark <[email protected]>:
> Hi,
> I have written a REST service using the default CXF jettison provider to 
> handle JSON. When returning JSON which should contain lists I have 
> experienced the issue of single lists being returned as an element.
> Using the serializeAsArray and the arrayKeys property of the JSONProvider I 
> am able to stop this happening and get the correct response.
> My questions are:
> A) I have read that Jettison will not encounter this problem because of the 
> way that the java is marshalled, but the downside is it cannot validate a 
> JSON request/response. As request and response validation is essential can 
> this be done in Jackson, and are there any other advantages in moving to 
> Jackson over Jettison.

I do schema-validation with Jettison and it works fine OK ( I only
checked requests )


> B) If I stick with jettison is there anyway to avoid having to populate the 
> arrayKeys property with all the elements i wish to be a list and still 
> achieve the same result?
> ThanksAndy

Reply via email to