Hi
On 07/14/2011 11:07 PM, charlesk wrote:
> Marshalled JSON produced using the JSONMarshaller with rootUnwrapping==false
> {
> "mybean": {
> "@id": "1234",
> "@locale": "ES",
> "@xml.lang": "es-ES",
> "nameelement": "*element name*",
> "email": " foo_at_xyz.com"
> }
> }
> Marshalled JSON produced using the JSONMarshaller with rootUnwrapping==true
> {
> "@locale": "ES",
> "@id": "1234",
> "@lang": "es-ES",
> "email": " foo_at_xyz.com",
> "nameelement": "*element name*"
> }
> So marshalling works as expected.
>
> Now, feeding these JSONs into the unmarshaller (with the same
> jsonconfiguration as marshaller) produces correct unmarshalled objects with
> fields populated.
O.K. I.e. it works as expected.
> However, below case where JSON is provided with root BUT when
> rootUnwrapping==true, then the unmarshalled objects have blank fields. I
The bellow JSON data was produced with rootUnwrapping=false,
you can not expect Jersey would correctly consume it
with rootUnwrapping=true.
~Jakub
> believe JSON should match with what we have configured in Jsonconfiguration.
> If it doesn't, it seems like unmarshalled objects will have blank fields.
> Is this correct understanding?
>
> {
> "mybean": {
> "@id": "1234",
> "@locale": "ES",
> "@xml.lang": "es-ES",
> "nameelement": "*element name*",
> "email": " foo_at_xyz.com"
> }
> }
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Unmarshalled-JSON-not-populating-object-fields-when-rootUnwrapping-true-tp6581733p6584890.html
> Sent from the Jersey mailing list archive at Nabble.com.
>