@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
- @Serializable Data Models
- @SerialName & Custom Field Mapping
- Nullable, Default & Optional Fields
- Plug Serialization into Ktor