Darren Bell
06/17/2019, 11:23 PMList is empty.", cause_th0jdv$_0: null, name: "NoSuchElementException"
My gradle file has the following
compile ("org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:${LibraryVersions.kotlin_js_serialization_version}")
compile ("org.jetbrains.kotlinx:kotlinx-serialization-runtime-js:${LibraryVersions.kotlin_js_serialization_version}")
compile ("io.ktor:ktor-client-core:${LibraryVersions.ktor_version}")
compile ("io.ktor:ktor-client-js:${LibraryVersions.ktor_version}")
compile ("io.ktor:ktor-client-json-js:${LibraryVersions.ktor_version}")
compile ("io.ktor:ktor-client-serialization-js:${LibraryVersions.ktor_version}")
compile ("io.ktor:ktor-client-auth-basic-js:${LibraryVersions.ktor_version}")
Has anyone managed to get this working?e5l
06/18/2019, 7:39 AMDarren Bell
06/18/2019, 8:49 AMval client = HttpClient(Js).config {
install(JsonFeature)
followRedirects = false
}
But I'm still getting the issue that there appears to be no defaultSerializer. Is my configuration incorrect? I'm using version 1.2.1 of ktor, and I'm pretty certain I had this working in a previous version.Darren Bell
06/18/2019, 8:55 AMJsonFeature
, deserialization appears to work as expected. But when I need to serialize an object for a POST, then I get a class cast exception instead. CheersDarren Bell
06/23/2019, 8:16 AMval client = HttpClient(Js).config {
install(JsonFeature) {
this.serializer = KotlinxSerializer(Json.nonstrict)
}
}
Simple when you know how!