Hi everyone,

I've already posted this issue on GitHub at 
https://github.com/FasterXML/jackson-dataformat-xml/issues/318 
<https://github.com/FasterXML/jackson-dataformat-xml/issues/318> because I 
think it is a bug with how XML is handling blank tags to deserialize POJOs, but 
maybe I'm just unaware of how this should work.
So I've decided to post it here for more/other input. Sorry for the noise.

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. Enabling 
DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT on the XmlMapper 
doesn't help either.

Is there a configuration flag which would make XmlWrapper interpret the blank 
tag as empty and deserialize it into null?

Jackson version: 2.9.7

Test case for reproduction:
https://gist.github.com/joschi/596e238857dab220df4e1836d4d79c2c 
<https://gist.github.com/joschi/596e238857dab220df4e1836d4d79c2c>


Best regards,
Jochen

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to