You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unexpected failure when decoding an inline class with a list value.
Reproduction repo
No response
Steps to reproduce
@JvmInline
@Serializable
value classFoo(valvalue:List<String>)
funmain() {
val format = com.charleskorn.kaml.Yaml.default
val text = format.encodeToString(Foo(listOf("A", "B", "C")))
format.decodeFromString<Foo>(text)
}
Expected behaviour
Runs successfully
Actual behaviour
Throws:
Exception in thread "main" IncorrectTypeException at <root> on line 1, column 1: Expected an object, but got a list
at com.charleskorn.kaml.YamlInput$Companion.createFor$kaml(YamlInput.kt:59)
at com.charleskorn.kaml.Yaml.decodeFromSource(Yaml.kt:64)
at com.charleskorn.kaml.Yaml.decodeFromString(Yaml.kt:55)
at MainKt.main(main.kt)
Describe the bug
Unexpected failure when decoding an inline class with a list value.
Reproduction repo
No response
Steps to reproduce
Expected behaviour
Runs successfully
Actual behaviour
Throws:
Version information
Any other information
No response
The text was updated successfully, but these errors were encountered: