russhwolf
09/03/2019, 4:01 AMNullPointerException
inside the unmap()
call. Is this a limitation of the use of Mapper
on native or am I doing something wrong?
@Test fun mapCoders() {
val foo = Foo("hello", 43110)
val mapper = Mapper.default
val map = mapper.map(Foo.serializer(), foo)
assertEquals("hello", map["bar"])
assertEquals(43110, map["baz"])
val newFoo = mapper.unmap(Foo.serializer(), map)
assertEquals(foo, newFoo)
}
@Serializable
data class Foo(val bar: String, val baz: Int)
russhwolf
09/03/2019, 4:04 AMsandwwraith
09/13/2019, 11:06 AMMapper
isn't supported now for Kotlin/Native 😞