解析BaseBean<T>格式泛型数据
class Business{
private String description;
/**Getter And Setter **/
}
反序列化BaseBean<Business>泛型类:
String json = "json格式数据";
Gson gson = new Gson();
Type type = new TypeToken<BaseBean<Business>>(){};
BaseBean<Business> bean = gson.fromJson(json,type);
网友评论