Closed dudleycodes closed 2 years ago
I apologize if there's a similar issue already opened - I didn't find anything when searching.
Describe the bug When a field has both the @JsonRawValue and the @JacksonXmlText annotations, the @JacksonXlmText annotation has no effect.
@JsonRawValue
@JacksonXmlText
@JacksonXlmText
Version information com.fasterxml.jackson.core:jackson-annotations:2.13.3 com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.13.3
To Reproduce
@JacksonXmlRootElement(localName = "test-pojo") public class TestPojo { @JacksonXmlProperty(isAttribute = true) String id; @JacksonXmlText @JsonRawValue String value; } //.... TestPojo sut = new TestPojo(); sut.id = "123"; sut.value = "<a>A</a><b someAttribute=\"B\">B</b>";
Actual output:
<test-pojo> <id>123</id> <value> <a>A</a> <b someAttribute="B">B</b> </value> </test-pojo>
Expected output:
<test-pojo> <id>123</id> <a>A</a><b someAttribute="B">B</b> </test-pojo>
Additional context
@JsonProperty("")
value
Moved to the right repository.
Thank you for reporting this, @dudleycodes and thank you @yawkat for fixing it so quickly! It will be in 2.14.0 (hoping to get first release candidate out within 2 weeks).
I apologize if there's a similar issue already opened - I didn't find anything when searching.
Describe the bug When a field has both the
@JsonRawValue
and the@JacksonXmlText
annotations, the@JacksonXlmText
annotation has no effect.Version information com.fasterxml.jackson.core:jackson-annotations:2.13.3 com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.13.3
To Reproduce
Actual output:
Expected output:
Additional context
@JsonProperty("")
annotation on thevalue
field, it had no effect.