Hi guys! I’m configuring Ktor in my mpp project. W...
# ktor
a
Hi guys! I’m configuring Ktor in my mpp project. When I run it in Android, it works perfectly, but when I try to call an API in iOS (Native), the error says:
Copy code
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.
h
For parsing with
kotlinx.serialization
on native you have to call
serializer()
manually inside a companion and pass it to
JSON
methods for it to work. Don't know how it's implemented in the serializer you linked.