Posts
Migrating to Ktor
Introduction The next hurdle to cross when considering KMM is networking. This means we will need to ditch retrofit in favour of Ktor, and if you haven’t already RxJava in favour of Coroutines. This post is only focussing on the Ktor aspect of the migration, as there is a plethora of Coroutines info online.
Initial Retrofit implementation So for a basic example app, I’ve used the free online Json Placeholder and displayed a simple list of posts.
Posts
Switching from Moshi to Kotlinx Serialization
Introduction With Kotlin Multiplatform officially in Alpha, we should now be seriously considering it for current and future projects. Regarding existing projects, this will typically mean switching from a number of popular libraries, to their KMM counterparts. Regarding Json deserialisation this most likely means going from Gson, Jackson or Moshi to Kotlinx Serialization.
To practically look at this, I’ve taken a small sample of json from the Sky News app feed and deserialised it using Moshi.