users@jersey.java.net

Re: [Jersey] RE: array handling in JAXB to JSON conversion

From: Wilhelmsen Tor Iver <TorIverW_at_arrive.no>
Date: Fri, 6 Mar 2009 14:00:52 +0100

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.