Hi Farrukh,
We wanted to produce the JSON documents to be as simple
as possible for clients to consume.
That is why, by default, the root element gets stripped off.
If you use MAPPED notation, you can however switch
the root element marshalling on.
I do not know what configuration method you are using,
but look for "root unwrapping" configuration property.
HTH,
~Jakub
On Thu, Feb 05, 2009 at 12:50:05PM -0500, Farrukh Najmi wrote:
>
> I have a JAXB object as my response which in normal XML format looks like:
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <RegistryObjectList ...>
> <RegistryObject ...>
> ....
> </RegistryObject>
> </RegistryObjectList>
>
> When it is marshalled to JSON I get:
>
> {
> "RegistryObject":{
> ...
> }
> }
>
>
> Question is why is it not like:
>
> {
> "RegistryObjectList":{
> "RegistryObject":{
> }
> }
> }
>
> Why is the root element not being marshalled?
>
> --
> Regards,
> Farrukh
>
> Web: http://www.wellfleetsoftware.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>