I have tried that too, but hasn't worked either.
-Moiz
From: Wilhelmsen Tor Iver [mailto:TorIverW_at_arrive.no]
Sent: Friday, March 06, 2009 5:01 AM
To: users_at_jersey.dev.java.net
Subject: Re: [Jersey] RE: array handling in JAXB to JSON conversion
Try adding required=true to this:
@XmlElement(name="items")
List<Item> items;
or else tell JAXB to treat nulls and empty collections differently. We ran into the same issue where null/empty elements were absent from the XML and thus a JAXB client would generate classes missing these properties.