0Pricing
Kotlin Multiplatform Academy · Lesson

Plug Serialization into Ktor

Install ContentNegotiation for automatic decoding.

Stop Parsing by Hand

You could decode every response manually, but Ktor can wire serialization in so requests and replies become typed automatically.

Meet ContentNegotiation

The ContentNegotiation plugin teaches the HttpClient how to convert request and response bodies to and from your models.

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