Data classes and parsing JSON (Droidcon Berlin 2018) - Updated for Moshi 1.6.0

Data classes and parsing JSON (Droidcon Berlin 2018) - Updated for Moshi 1.6.0

Presented at Droidcon Berlin 2018 - Abstract:

The announcement of Kotlin's first class support at Google I/O 2017 is only one year old and its popularity is growing rapidly ever since.

At Kitchen Stories we fell in love with Kotlin and we are migrating our code base gradually to leverage the features Kotlin provides us. One of our first migrations was changing all Models assembling the JSON structure from our API.

In this session I want to take you along the journey on how and why we migrated all our "POJOs" to "POKOs". You will learn how you can write better models using Kotlin's Data Classes and how you can leverage features like constructor default values and non-nullable fields for more robust JSON parsing.

Some more explanation to the slides can be found here:

The Live-Code-Example is available here:


Stefan Medack

June 26, 2018