📅  最后修改于: 2022-03-11 14:52:30.848000             🧑  作者: Mango
// Top of file
import java.lang.reflect.Type;
// ...
private void parseJSON() {
Gson gson = new Gson();
Type type = new TypeToken>(){}.getType();
List contactList = gson.fromJson(jsonString, type);
for (ContactModel contact : contactList){
Log.i("Contact Details", contact.id + "-" + contact.name + "-" + contact.email);
}
}