-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XMLMapper fails to deserialize null (POJO reference) from blank tag #318
Milestone
Comments
I am also facing the same issue. Could anyone provide your inputs? |
Yes, I can reproduce this. Added failing test. Would be good to resolve, but depends on whether I have time to look into this issue in near future. |
cowtowncoder
added a commit
that referenced
this issue
Oct 3, 2019
Any news? |
Figure out a way to do this, using |
cowtowncoder
added a commit
that referenced
this issue
May 1, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using
XmlMapper
to deserialize XML documents from some external sources and map them to predefined POJOs.When Jackson encounters a blank tag (not empty, but only whitespace characters), I would expect it to deserialize it into a null reference or an equivalent empty collection, depending on the configuration of the
XmlMapper
.Unfortunately, Jackson fails with a
MismatchedInputException
. EnablingDeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT
on theXmlMapper
doesn't help either.Is there a configuration flag which would make
XmlWrapper
interpret the blank tag as empty and deserialize it intonull
?Jackson version: 2.9.7
Test case for reproduction:
The text was updated successfully, but these errors were encountered: