I can’t seem to use client/JsonFeature. I declared...
# ktor
l
I can’t seem to use client/JsonFeature. I declared the dependency (
"io.ktor:ktor-client-json:$ktor_version"
) in my build.gradle, and I see it (can even navigate into it) in IntelliJ. But I can’t call install(JsonFeature)` . (“Unresolved Reference”) I tried the fully qualified name,
gradle clean
, and even deleting the whole
~/.gradle
folder. Nothing. Hitting “build” tells me, that client-json requires “’org.jetbrains.kotlinxkotlinx serialization common0.10.0”, but adding that to dependencies also doesn’t help. And also, it shouldn’t be that hard. Any ideas?
ok, solved it 🤦‍♂️ one has to add either ktor-client-jackson, ktor-client-gson or ktor-client-gson or ktor-client-serialization in order to make it compile. I thought of them like an addition
still can’t run it - it still says it needs org.jetbrains.kotlinxkotlinx serialization runtime common0.10.0
e
You could try to add
Copy code
maven { url "<https://kotlin.bintray.com/kotlinx>" }
in the top-level repo section 🙂
👍 1
l
Works! Thanks a lot! 🙌
Did I miss that in the docs, or is it missing? 🤔
e
We'll sync future versions with
jcenter()
, last mention could be found here https://github.com/Kotlin/kotlinx.serialization 🙂
👍 1