Kotlin Serialization

Learn what Kotlin Serialization library is and how to use it in your Android app. Also learn how it differs from other data serialization libraries like Moshi and Gson. By Bhavna Thacker.

3 (3) · 2 Reviews

Download materials
Save for later
Comments
Share

Who is this for?

This course is for Android developers who wish to learn basics of Serialization/Deserialization and how to use Kotlin Serialization library in their apps. This course expects familiarity with Android Studio and basics of Kotlin programming language.

Covered concepts

  • Data Serialization & Deserialization
  • Data Encoding & Decoding
  • Kotlin Serialization
  • Compiler Plugin
  • JSON Encoder Module
  • Comparison of Serialization Libraries
  • Customizations in Kotlin Serialization Library
  • Integration with Retrofit
  • Writing Serializers Manually

Part 1: Kotlin Serialization

Learn the process of Data Encoding and Serialization followed by Data Decoding and Deserialization.

Toggle description

Explore the starter project and add required dependencies for Kotlin Serialization Library.

Learn about Compiler Plugin & JSON Encoder Module and then compare Kotlin Serialization Library with Moshi and Gson.

Toggle description

Learn how to model your data using annotations & how to encode it manually.

Toggle description

Learn how to serialize composite types, customize property names and mark data as Transient.

Toggle description

Learn how to use Retrofit with the Kotlin Serialization library to fetch data from a remote API.

Toggle description

Learn how to write a serializer manually by providing descriptor and logic for serialization/deserialization.

Learn about limitations of Kotlin Serialization library.