json解析
来源:互联网 发布:明星开的淘宝店 编辑:程序博客网 时间:2024/05/01 06:25
public static List<Messagebean> parsemessageList(String str){List<Messagebean> list = new ArrayList<Messagebean>();try{JSONObject json = new JSONObject(str);JSONArray array = (JSONArray) json.get("content");for (int i = 0; i < array.length(); i++) { JSONObject temp = (JSONObject) array.get(i); Messagebean entity = new Messagebean(); try{entity.setCreattime(temp.getString("creattime"));}catch(Exception e){e.printStackTrace();entity.setCreattime("creattime");} try{entity.setContent(temp.getString("content"));}catch(Exception e){e.printStackTrace();entity.setContent("content");} try{entity.setTittle(temp.getString("tittle"));}catch(Exception e){e.printStackTrace();entity.setTittle("tittle");} try{entity.setId(temp.getString("id"));}catch(Exception e){e.printStackTrace();entity.setId("id");}try{entity.setMdn(temp.getString("mdn"));}catch(Exception e){e.printStackTrace();entity.setMdn("mdn");}try{entity.setIsread(temp.getString("isread")); //(0:基站,1:GPS)(必填)}catch(Exception e){e.printStackTrace();entity.setIsread("isread");}list.add(entity);} }catch(Exception e){e.printStackTrace();}return list;}
0 0
- 【JSON解析】JSON解析
- 解析JSON
- Json解析
- JSON解析
- JSON解析
- json解析
- Json解析
- Json解析
- JSON解析
- Json解析
- Json解析
- JSON解析
- JSON解析
- json 解析
- Json解析
- JSON解析
- json解析
- json 解析
- 俄罗斯方块的model需要用到的类的详细解说
- 特殊的IP地址
- 字符串拷贝函数strcpy的几种实现思想方式
- hbase分布式部署过程
- data_support/utlist(关于编译器的一些宏宏设置)
- json解析
- http://www.similarweb.com/
- 【js设计模式笔记---代理模式】
- Android 底部菜单的实现方法
- 微博转移
- JDBC连接MySQL数据库及示例
- Mahout朴素贝叶斯文本分类
- OCP 1Z0 051 82
- oracle教程