Skip to content

java.util.NoSuchElementException when deserializing twice from the same JsonElement #807

@qwwdfsad

Description

@qwwdfsad

Steps to reproduce:

@Serializable
sealed class Foo {
    @Serializable
    data class Bar(val a: Int) : Foo()
}
@Test
fun testFoo() {
    val json = Json.toJson(Foo.Bar(1))
    println(Json.fromJson<Foo>(json))
    println(Json.fromJson<Foo>(json))
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions