标签:class set 字段 import 工具 style get port records
import com.google.gson.Gson;
//string转bean Gson gson = new Gson(); UserPage userPage = gson.fromJson(str, UserPage.class); List<UserVo> data = userPage.getData(); //加字段 userPage.setRecordsFiltered(data.size()); userPage.setRecordsTotal(data.size()); //bean转string String json = gson.toJson(userPage);
标签:class set 字段 import 工具 style get port records
原文地址:http://www.cnblogs.com/ljl-blog/p/7267522.html