users@jersey.java.net

Re: [Jersey] XML Schema, JSON arrays and java List<String>

From: Martin Probst <mail_at_martin-probst.com>
Date: Tue, 4 Aug 2009 12:28:42 +0200

Hi,

> {"message-keys":{"msg-key":["input.incorrect","foo","bar"]}}
>
> Any tricks I am missing to remove the need for the msg-key property?

I think this came up several times, and the consensus is that you're
basically out of luck with the POJO->XML->JSON route to get something
nice (in several places). If you want to produce "natural" JSON
especially for things like maps and lists. You could use Jackson which
makes it much easier to get nice JSON, though you'll have twice the
annotations.

Martin