Anyone know what happened to KotlinxSerializer in ...
# multiplatform
p
Anyone know what happened to KotlinxSerializer in Ktor 1.2.2? Previously I could do:
Copy code
HttpClient {
      install(JsonFeature) {
           serializer = KotlinxSerializer()
But after updating the KotlinxSerializer class is not found
r
It’s in a separate module as of 1.2.0. Make sure to add
ktor-client-serialization
in common and
ktor-client-serialization-jvm
or
ktor-client-serialization-native
in platform targets
o
s
and don't forget to add this to your settings.gradle
pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.id == "kotlin-multiplatform") {
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
}
if (requested.id.id == "kotlinx-serialization") {
useModule("org.jetbrains.kotlin:kotlin-serialization:${requested.version}")
}
}
}
}
p
Thank you! been looking for this for awhile