Narayan Iyer
10/29/2018, 12:50 PMJSON
response with KTOR? Tried and got this:
java.lang.IllegalArgumentException: Response pipeline couldn't transform 'class java.util.Collections$SingletonMap' to the OutgoingContent
at io.ktor.server.engine.BaseApplicationResponse$$special$$inlined$apply$lambda$1.invokeSuspend(BaseApplicationResponse.kt:38)
at io.ktor.server.engine.BaseApplicationResponse$$special$$inlined$apply$lambda$1.invoke(BaseApplicationResponse.kt)
at io.ktor.util.pipeline.PipelineContext.proceed(PipelineContext.kt:53)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:24)
Checked out the documentation and saw this: install(ContentNegotiation)
... but documentation is sketchy ... any ideas?mp
10/29/2018, 12:51 PMSergio Casero
10/29/2018, 1:11 PMSergio Casero
10/29/2018, 1:11 PMSergio Casero
10/29/2018, 1:11 PMimplementation "io.ktor:ktor-gson:$ktor_version"
Sergio Casero
10/29/2018, 1:12 PMinstall(ContentNegotiation) { gson {} }
Narayan Iyer
10/29/2018, 1:58 PMgson { }
block, its somewhat unclear as to what needs to go there!Narayan Iyer
10/29/2018, 1:59 PM