0Pricing
Kotlin Multiplatform Academy · Lesson

@Serializable Data Models

Annotate models for compile-time-safe parsing.

JSON Needs a Map

APIs speak JSON, but your shared code wants Kotlin objects. kotlinx.serialization bridges that gap on every KMP target.

Compile-Time Safety

Unlike reflection-based parsers, this library generates code at compile time, so it works fast and predictably on Android and iOS.

All lessons in this course

  1. @Serializable Data Models
  2. @SerialName & Custom Field Mapping
  3. Nullable, Default & Optional Fields
  4. Plug Serialization into Ktor
← Back to Kotlin Multiplatform Academy