GSON使用:
//获得list集合
List product = find.product(parameter);
//创建一个GSON对象
Gson gson = new Gson();
//导出GSON格式得字符串
String json = gson.toJson(product);
GSON使用:
//获得list集合
List product = find.product(parameter);
//创建一个GSON对象
Gson gson = new Gson();
//导出GSON格式得字符串
String json = gson.toJson(product);
Comment here is closed