Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork233
Open
Description
Search before asking
- I searched in theissues and found nothing similar.
Describe the bug
Following class can't be deserialized with Jackson 2.18.2:public record Variable( @JacksonXmlProperty(isAttribute = true, localName = "name") String name, @JacksonXmlText String value) {}
deserialization fails with:Invalid definition for property '' (of type com.Variable): Could not find creator property with name '' (known Creator properties: [name, value]) at [Source: (StringReader); line: 1, column: 1]
it works with Jackson 2.17.2. Also it works with 2.18.2 but with POJO only
Version Information
2.18.2
Reproduction
-->
publicrecordVariable(@JacksonXmlProperty(isAttribute =true,localName ="name")Stringname,@JacksonXmlTextStringvalue) {publicstaticvoiddeserialize()throwsJsonProcessingException {XmlMapperxmlMapper =newXmlMapper();Variabledeserialized =xmlMapper.readValue("<jackson name=\"value\">test</jackson>",Variable.class);System.out.println(deserialized); }}
Expected behavior
Java record is deserialized
Additional context
No response