随笔分类 -  json

摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf- 阅读全文
posted @ 2013-05-22 12:51 jshen 阅读(431) 评论(0) 推荐(0)
摘要://json-lib-2.2-jdk15.jarimport net.sf.json.JSONArray;import net.sf.json.JSONObject;1.//把java对象列表转换为json对象数组,并转为字符串JSONArray array = JSONArray.fromObject(userlist); String jsonstr = array.toString();2.//把java对象转换成json对象,并转化为字符串JSONObject object = JSONObject.fromObject(invite);Log4jInit.ysulogger.debu 阅读全文
posted @ 2013-04-17 16:50 jshen 阅读(304) 评论(0) 推荐(0)