On Tue, Feb 22, 2011 at 8:41 AM, Pavel Bucek <pavel.bucek_at_oracle.com> wrote:
...
> yes, thats expected too. If you really want JSON output, you should do
> something like this:
>
> @GET
> @Path("/a")
> @Produces("application/json")
> public JSONArray getMessages() {
> List<String> l = new ArrayList<String>();
> l.add("a");
> l.add("b");
> l.add("c");
> return new JSONArray(l);
I think easier way would be to use plain POJO mapper, since Jackson
can serialize both List<String> and String[] just fine.
-+ Tatu +-