users@jersey.java.net

[Jersey] Question about natural notation

From: NBW <emailnbw_at_gmail.com>
Date: Tue, 15 Mar 2011 15:37:25 -0400

I'm experimenting with using JAXBContextResolver and I have a
JSONConfiguration.natural().rootUnwrapping(false) setting for my context.
Things look good but one thing that isn't formatting just right for my needs
is the case where a property is a List and the list has 0 elements. Right
now it is left out of the JSON response. What I would like is to include it
with the root element wrapped like so:

"fooList":[]

That is the behavior I am seeing with Jackson POJO support, however, I can't
find a way to turn off rootUnwrapping in general with that or I would go
that route. Thanks!

-Noah