-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hcon: error while trying to decode MAP + sealed class #1581
Comments
Seems like that polymorphism is not implemented in HOCON correctly |
Any updates on this? |
I just hit a variation of this issue, which is that a Usng the OP's strutruces: @Serializable
sealed class Node
@Serializable
data class Root(val name: String): Node()
@Serializable
data class Simple(val a: String)
data class Wrapper(nodes: List<Node>)
val wrapper = Wrapper( ... )
val hocon = Hocon.encodeToConfig(wrapper)
val deserialized = Hocon.decodeFromConfig<Wrapper>(hocon) Results in this exception:
Tested using kotlinx-serialization-hocon-1.5.1.jar |
+1 |
I have updated my PR with a fix for this. Ended up forgetting it was still marked as draft. |
additions to #1046
output
output: useArrayPolymorphism = true
Environment
The text was updated successfully, but these errors were encountered: