https://kotlinlang.org logo
#ktor
Title
# ktor
l

lovis

04/12/2019, 9:25 AM
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

e5l

04/12/2019, 9:34 AM
You could try to add
Copy code
maven { url "<https://kotlin.bintray.com/kotlinx>" }
in the top-level repo section 🙂
👍 1
l

lovis

04/12/2019, 9:36 AM
Works! Thanks a lot! 🙌
Did I miss that in the docs, or is it missing? 🤔
e

e5l

04/12/2019, 9:45 AM
We'll sync future versions with
jcenter()
, last mention could be found here https://github.com/Kotlin/kotlinx.serialization 🙂
👍 1
61 Views