The following test is failing for me on Native. It...
# serialization
r
The following test is failing for me on Native. It throws a
NullPointerException
inside the
unmap()
call. Is this a limitation of the use of
Mapper
on native or am I doing something wrong?
Copy code
@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)
Full stack trace attached
s
Mapper
isn't supported now for Kotlin/Native 😞