随笔分类 - 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-
阅读全文
摘要://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
阅读全文

浙公网安备 33010602011771号