Hi Peter,
You should be able to use the POJO mapping feature [1] based on the Jackson
JSON provider. Then the String[] -> JSON conversion works just fine.
Please let me know if the above does not work for you,
Thanks,
~Jakub
[1]
http://jersey.java.net/nonav/documentation/latest/json.html#d4e901
On 29.7.2011 1:17, Peter Tap wrote:
<snip/>
> However, if you wrap your collection in another class, it works:
>
> @XmlRootElement
> public class MyItem {
> public String[] items;
> }
>
> @GET
> @Produces("application/json")
> public MyItem getIt() { // THIS WORKS
> ...
> }
>
> This seems to be a limitation in Jersey's implementation. A similar
> web service under Windows (WCF) does not have an issue returning
> String[] from a web service method.
>
> Regards,
> Peter
>