users@jersey.java.net

Question on JAXB JSON Marshalling

From: Farrukh Najmi <farrukh_at_wellfleetsoftware.com>
Date: Thu, 05 Feb 2009 12:50:05 -0500

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