Android/Kotlin Series: [#04] — How to use TypeToken + generics with Gson in Kotlin?
Nowadays a lot of people use Gson to convert JSON strings to Java or Kotlin objects and in this tutorial, I will show you how to write convenience methods that will make that task easier.
For Java
You have to specify the type of T
at the time of deserialization. How would your List
of…