Deserialisation

Report a typo

Put the lines of code in the correct order to get the list of cats.

Put the items in the correct order
val type = Types.newParameterizedType(List::class.java, Cat::class.java)
val catList = catListAdapter.fromJson("[{\"name\":\"Barsik\"}, {\"name\":\"Masya\"}]")
.add(KotlinJsonAdapterFactory())
val catListAdapter = moshi.adapter<List<Cat?>>(type)
.build()
val moshi = Moshi.Builder()
___

Create a free account to access the full topic