Kotlin convert json string to list of object using Gson
Try this, it uses object instead of Type..
measurements : List<SomeOjbect> = gson.fromJson(text, object : TypeToken<List<SomeOjbect>>() {}.type)
You could try doing this instead:
val objectList = gson.fromJson(json, Array<SomeObject>::class.java).asList()
EDIT [14th January 2020]: You should NOT be using GSON anymore. Jake Wharton, one of the projects maintainers, suggests using Moshi, Jackson or kotlinx.serialization.