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

cafonsomota

01/26/2022, 4:28 PM
hello all! I was looking at the change log of ktor 2.0.0-beta1, and I’ve noticed that there’s XML support for the client: • https://github.com/ktorio/ktor/commit/0acc7080d40b1978c62e39be20470ae971417bde If I’m not mistaken, the library to import should be this one, right?
Copy code
implementation("io.ktor:ktor-serialization-kotlinx-xml:2.0.0-beta-1")
However, it seems that I’m unable to use it at the moment - no classes found - at Multiplatform level (Kotlin 1.6.10). Is there something that I might be missing?
b

brabo-hi

01/26/2022, 9:13 PM
i am getting the same error on KMM
got it working with
Copy code
val commonMain by getting {
  dependencies {
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
                implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
  }
  
}
a

Aleksei Tirman [JB]

01/27/2022, 10:53 AM
Currently, the
ktor-serialization-kotlinx-xml
is supported under JVM only.
c

cafonsomota

01/27/2022, 11:31 AM
Thank you @Aleksei Tirman [JB] ! Do you know when it will be available for native, for instance? 🙂
a

Aleksei Tirman [JB]

01/27/2022, 11:33 AM
@e5l
5 Views