What is best way to integrate kotlinx serializatio...
# serialization
j
What is best way to integrate kotlinx serialization+ktor client in a MPP? The only resource I could find is : https://ktor.io/clients/http-client/features/json-feature.html which refers to using a JVM dependency
s
@e5l
AFAIR, there should be corresponding dependencies like
ktor-client-json-js
and
ktor-client-json-ios
r
I think it’s
ktor-client-json-native
unless it changed in 1.2.0
j
There is ios and jvm. Shouldn't there be a common for the common module?
ktor-client-json doesn't contain KotlinxSerializer
For now I just did Json.parse() on string response. Not as elegant as client.get<MyType> but works
e
KotlinxSerializer
moved into separate artifact:
ktor-client-serialization
j
Thanks! So ktor-client-serialization in common module? Any additional dependencies for android/ios?
e
ktor-client-serialization-jvm
for android android and
ktor-client-serialization-native
for ios
🙏 1