I would file a bug report (issue on jackson-dataformat-xml).
The problem itself is that due to differences between logical content
model of XML and JSON, XmlMapper has to provide work-arounds to cases
like this -- since module exposes this:
<Country>Italy</Country>
as basically equivalent to same token sequence as:
{ "Country": "Italy" }
there's a need to "unwrap" String value. This should happen for plain
`String` type (you can try it), and probably even default Enums. But I
think this won't be done for custom constructors.
So that's missing handling.
A possible work-around would be to take in `JsonNode` (instead of
`String`) and handle `ObjectNode` case (for XML), and if necessary,
regular `TextNode` for other formats like JSON.
-+ Tatu +-
> --
> 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
jackson-user...@googlegroups.com.
> To view this discussion visit
https://groups.google.com/d/msgid/jackson-user/439271ea-1295-42fd-ac25-e1f363d1f5a0n%40googlegroups.com.