https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
a

alexfacciorusso

01/10/2019, 5:17 PM
Sorry if today I’m cross-posting everywhere lol 😄 Has anyone used Ktor in a mpp environment and Json serialization? https://kotlinlang.slack.com/archives/C0A974TJ9/p1547140430248900
e

einar

01/10/2019, 6:45 PM
Could you have missed to add a mapper for one of your classes being serialized? Like demonstrated here: https://github.com/JetBrains/kotlinconf-app/blob/master/common/src/commonMain/kotlin/org/jetbrains/kotlinconf/api/KotlinConfApi.kt#L16
👍 1
k

kpgalligan

01/10/2019, 10:25 PM
Can also confirm this works. We did the same in Droidcon app: https://github.com/touchlab/DroidconKotlin
p

pandawarrior

01/11/2019, 1:36 AM
Can run on my end too.:)
a

alexfacciorusso

01/11/2019, 9:11 AM
Nice, I saw that code somewhere and I tried, but the problem was that I wasn't getting the .serializer() method generated in the companion object. I'll try again as soon as I reach my office. I suppose it was a problem with the kotlinx-serialization gradle plugin. Thanks!