Skip to content
This repository has been archived by the owner on Jun 26, 2021. It is now read-only.

attribute with null as value is not checked #81

Closed
juergen-albert opened this issue Mar 16, 2016 · 5 comments
Closed

attribute with null as value is not checked #81

juergen-albert opened this issue Mar 16, 2016 · 5 comments
Labels
Milestone

Comments

@juergen-albert
Copy link

If a plain JSON is read like the following example:

"matches": [
{
"continent": {
"matchHighlights": [],
"value": "Europa"
},
"city": {
"matchHighlights": [],
"value": "Stuttgart"
},
"logo44x44rounded": "someUrl",
"rating": null,
"description": {
"matchHighlights": [],
"value": "some description"
}
]
}

The null that appears in rating is not checked and the deserialization stumbles and breaks.

The solution looks easy:

It looks like the following snippet would do the job if added to line 195 in the EObjectDeserializer.readFeature method
if (jp.getCurrentToken() == JsonToken.VALUE_NULL) { return; }

@ghillairet
Copy link
Member

Thanks for the PR, it's been added to the 0.15 release.

@juergen-albert
Copy link
Author

Thx, Is the bug fix available on your p2 updatesite?

@ghillairet
Copy link
Member

It should be there now, release 0.15.0.

@juergen-albert
Copy link
Author

It appears, that http://ghillairet.github.io/p2/ is not available. Are there some structural changes I'm not aware of?

@ghillairet
Copy link
Member

Fixed now.

ghillairet added a commit that referenced this issue Apr 24, 2016
add test

Splitting deserialization to use default jackson deseerializers when possible and specific emf deserializers when necessary.
ghillairet added a commit that referenced this issue Jul 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants