Gson FromJson List (Kotlin)

April 14, 2018
val gson = Gson()
val jsonString = gson.toJson(list)
val listType = object : TypeToken<List<String>>() { }.type
val newList = gson.fromJson<List<String>>(jsonString, listType)
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.