80,351
社区成员
发帖
与我相关
我的任务
分享
/**
* 将json格式转换成list对象
*
* @param jsonStr
* @return
*/
public static List<?> jsonToList(String jsonStr) {
List<?> objList = null;
if (gson != null) {
java.lang.reflect.Type type = new com.google.gson.reflect.TypeToken<List<?>>() {
}.getType();
objList = gson.fromJson(jsonStr, type);
}
return objList;
}