jackson-dataformat-xml icon indicating copy to clipboard operation
jackson-dataformat-xml copied to clipboard

@JacksonXmlRootElement does not enforce the local name during deserialization

Open LeonardMeyer opened this issue 7 years ago • 1 comments

I was redirected here from the google group, so I'll just repeat what I said there : the localName attribute of @JacksonXmlRootElement is not enforced during deserialization. In other words, if I want the input to be

<test>
  <inner>1</inner>
</test>

And I get

<ohnoes>
  <inner>1</inner>
</ohnoes>

inner will still be deserialized properly. This seems weird to me. Here is a fully reproductible test.

LeonardMeyer avatar Jun 22 '17 08:06 LeonardMeyer

I think this has come up more than once during discussions so will mark as "most-wanted", despite no thumbs-up here. Also added failing simple test case -- I suspect this must be opt-in Feature, when added.

cowtowncoder avatar Nov 13 '20 22:11 cowtowncoder