> > 1) Can Jersey be made to handle it properly so that both XML and
JSON
> > end up with the same root? (So instead of "People" and "person", I
get
> > "people"?)
>
> In this case i would like to see Jersey generating JSON array
> instead of JSON object for java collections. Then the root element
would
> not
> exist. Would this approach work for you?
I'm sure it would work but for readability, seeing "{'people': [...]}"
is easier to understand than what an array would provide. I don't mind
honestly since I'm writing the tool but it just seemed wild that XML and
JSON created the same representation with differing root nodes. (I know
JSON doesn't comprise of nodes but it seemed like a logical
correlation.)
> > 2) If not, what options do I have to get this more like I want it?
>
> I will need to have a more detailed look into this case.
> (Attending a conference and do not have much time for it this week).
> Please feel free to file a RFE at [1], so that i can keep track on it.
I might just do that. The ability to massage the content in an easy way
seems to make sense. XStream has the ability to do aliases which do the
same thing I'm proposing.
> >
> > I don't mind having to do the XML and JSON myself using utility
classes
> > or something but with Jersey providing so much, I figured I'd get
some
> > advice before writing more generic serializers.
>
>
> I will be happy to update current JSON functionality to better suit
your
> needs,
> so there is no need for you to add special utilities to your
application
> for this.
I might take you up on this at a later time. I'm still new enough to
Jersey to actually doubt my usage instead of doubting Jersey. ;)