https://kotlinlang.org logo
#ktor
Title
# ktor
r

ribesg

03/12/2019, 1:26 PM
Copy code
Caused by: kotlin.NotImplementedError: An operation is not implemented: Obtaining serializer from KClass is not available on native due to the lack of reflection. Use .serializer() directly on serializable class.
Ok, but how are you supposed to do that? Is it a bug in ktor?
e

e5l

03/12/2019, 1:27 PM
Nope. It’s a lack of support in kotlinx.serialization.
You can’t extract the serializer with reflection on native. You could try to pass
MyClass.serializer()
explicitly.
r

ribesg

03/12/2019, 1:31 PM
Pass where? To what? Using
setMapper
?
6 Views