```Caused by: kotlin.NotImplementedError: An opera...
# ktor
r
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
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
Pass where? To what? Using
setMapper
?