Can someone please help me with understanding what...
# ktor
v
Can someone please help me with understanding what is wrong with my response parsing in ktor https://stackoverflow.com/questions/71900269/ktor-failing-to-parse-response-no-transformation-found-class-io-ktor-utils-io-b
Copy code
val client = HttpClient(CIO) {
            install(ContentNegotiation) {
                json(Json {
                    prettyPrint = true
                    isLenient = true
                })
            }
        }
my ide shows an error in there
Copy code
'fun <P : Pipeline<*, ApplicationCall>, B : Any, F : Any> Application.install(plugin: Plugin<Application, ContentNegotiationConfig, PluginInstance>, configure: ContentNegotiationConfig.() -> Unit = ...): PluginInstance' can't be called in this context by implicit receiver. Use the explicit one if necessary
a
Please check packages of
ContentNegotiation
for both client and server.
Maybe, you imported a wrong dependency.
v
@Aleksei Tirman [JB] I have installed both
Copy code
implementation("io.ktor:ktor-server-content-negotiation:$ktor_version")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version")
a
I see only for the server here
đź‘Ť 1
v
yeah my bad. will post final code in stack overflow so maybe other can read what’s wrong)