-
Notifications
You must be signed in to change notification settings - Fork 43
Contextual with Element throws Inline classes can not be decoded directly #220
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingindevThe issue is fixed/implemented in the dev branchThe issue is fixed/implemented in the dev branch
Description
This did work with 0.86.3:
@Serializable
data class Box(
@Contextual
@XmlElement val i: Instant
)
@Test
fun a() {
val box: Box = XML.defaultInstance.decodeFromString(
"""<?xml version="1.0" encoding="UTF-8"?>
<Box>
<i>2023-11-02T15:56:49.364+01:00</i>
</Box>
""".trimIndent()
)
}With 0.90.1:
In: Box/i Error: 3:21 - Inline classes can not be decoded directly
nl.adaptivity.xmlutil.XmlException: In: Box/i Error: 3:21 - Inline classes can not be decoded directly
at nl.adaptivity.xmlutil.serialization.XmlDecoderBase$TagDecoderBase.decodeSerializableElement(XMLDecoder.kt:856)
at SerializationTest$Box$$serializer.deserialize(SerializationTest.kt:14)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingindevThe issue is fixed/implemented in the dev branchThe issue is fixed/implemented in the dev branch