class Entity{
int message-count;
Listmessages;
}
class Message{
String to;
int message-id;
int status;
double remain-balance;
double message-price;
int network;
}
接一楼回答:
生成2个class中属性的set、get方法,然后:
Entity entity = ((Entity)new Gson().fromJson(jsonStr, new TypeToken(){}.getType()));