把json数据转换成集合


Sting MessageList="";
JSONArray json = JSONArray.fromObject(MessageList);

JSONObject object = null;
List<Object> messageList = new ArrayList<>();
Message t=null;
for (int i = 0; i < json.size(); i++) {
object = JSONObject.fromObject(json.get(i));
messageList.add(object);
}
posted @ 2018-11-30 11:13  代码界的绵绵雨  阅读(3951)  评论(0编辑  收藏  举报