Essential Libraries – Ktor, Kotlin Serialization, and Coil
In the previous chapter, we learned how to implement navigation in our app. In this chapter, we will learn how to present dynamic content to the user as they navigate our app. Here, we will cover the steps needed to present app users with dynamic content fetched from remote servers. You will also be introduced to the different libraries required to retrieve and handle this dynamic data.
By the end of this chapter, you will be able to fetch data from a network endpoint using Ktor, parse JavaScript Object Notation (JSON) payloads into Kotlin data objects using Kotlin Serialization, and load images into AsyncImage
composables using Coil.
We will cover the following topics in this chapter:
- Introducing REST, API, JSON, and XML
- Fetching data from a network endpoint
- Parsing a JSON response
- Loading images from a remote URL