File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/test/kotlin/tools/jackson/module/kotlin/test/github Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11package tools.jackson.module.kotlin.test.github
22
3+ import com.fasterxml.jackson.annotation.JsonRootName
34import tools.jackson.databind.exc.InvalidDefinitionException
45import tools.jackson.dataformat.xml.XmlMapper
56import tools.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper
67import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty
7- import tools.jackson.dataformat.xml.annotation.JacksonXmlRootElement
88import tools.jackson.module.kotlin.kotlinModule
99import tools.jackson.module.kotlin.test.expectFailure
1010import org.junit.jupiter.api.Test
1111import kotlin.test.assertEquals
1212
1313class TestGithub153 {
14- @JacksonXmlRootElement(localName = " MyPojo" )
14+ @JsonRootName( " MyPojo" )
1515 class MyPojo {
1616 @JacksonXmlElementWrapper(localName = " elements" )
1717 @JacksonXmlProperty(localName = " element" )
@@ -23,7 +23,7 @@ class TestGithub153 {
2323 var value: String? = null
2424 }
2525
26- @JacksonXmlRootElement(localName = " MyPojo" )
26+ @JsonRootName( " MyPojo" )
2727 data class MyDataPojo (
2828 @JacksonXmlElementWrapper(localName = " elements" )
2929 @JacksonXmlProperty(localName = " element" )
Original file line number Diff line number Diff line change 11package tools.jackson.module.kotlin.test.github.failing
22
33import com.fasterxml.jackson.annotation.JsonIgnoreProperties
4+ import com.fasterxml.jackson.annotation.JsonRootName
45import tools.jackson.databind.exc.InvalidDefinitionException
56import tools.jackson.dataformat.xml.XmlMapper
67import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty
7- import tools.jackson.dataformat.xml.annotation.JacksonXmlRootElement
88import tools.jackson.dataformat.xml.annotation.JacksonXmlText
99import tools.jackson.module.kotlin.readValue
1010import tools.jackson.module.kotlin.test.expectFailure
1111import tools.jackson.module.kotlin.kotlinModule
1212import org.junit.jupiter.api.Test
1313
1414class TestGithub138 {
15- @JacksonXmlRootElement(localName = " sms" )
15+ @JsonRootName( " sms" )
1616 @JsonIgnoreProperties(ignoreUnknown = true )
1717 data class Sms (
1818 @JacksonXmlProperty(localName = " Phone" , isAttribute = true )
You can’t perform that action at this time.
0 commit comments