Data Classes and parsing JSON — A Story about converting Models to Kotlin
Kitchen Stories Engineers
2563

Greate Job.

The following code need to be included in the article

val moshi = Moshi.Builder() .add(DefaultOnDataMismatchAdapter.newFactory(VideoType::class.java, VideoType.unknown)) /* 1 */ .add(DefaultOnDataMismatchAdapter.newFactory(Video::class.java, null)) /* 2 */ .add(DefaultOnDataMismatchAdapter.newFactory(Content::class.java, null)) /* 3 */ .add(FilterNullValuesFromListAdapter.newFactory(Content::class.java)) /* 4 */ .add(DefaultOnDataMismatchAdapter.newFactory(Article::class.java, null)) /* 5 */ .add(KotlinJsonAdapterFactory()) .build()

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.