pajatopmr
09/18/2023, 5:07 PMpdvrieze
09/19/2023, 10:44 AMpdvrieze
09/19/2023, 10:56 AMpajatopmr
09/19/2023, 11:25 AMpdvrieze
09/19/2023, 11:38 AM@Test fun `serialize and deserialize`() {
val json = Json { }
assertEquals("{\"data\":[\"a\",\"b\"]}", json.encodeToString(Common(listOf("a", "b"))))
assertEquals(Common(listOf("a", "b")), json.decodeFromString<Common>("{\"data\":[\"a\",\"b\"]}"))
}
It's probably better to split them out, but this was just trying to see a difference (It increased the pass count for the annotation line from 2 to 3).pajatopmr
09/19/2023, 11:41 AM