import com.google.gson.Gson;
inline fun <reified T> List<Any>.toBeanList(): List<T> {
val newList : MutableList<T> = arrayListOf()
for (item in this){
val toJson = gson.toJson( item)
val entity: T = gson.fromJson(toJson,T::class.java)
newList.add(entity)
}
return newList.toList()
}
Mainly to record inline and reified, for fear of forgetting, the other is not to read the book too hard, be flexible