json三种格式
JSONObject jsonParam = new JSONObject();
//第一种
jsonParam.put("name", poolname);
jsonParam.put("callCondition", "voice_upload");
//第二种
JSONObject jsonObject = new JSONObject();
jsonObject.put("voicePacketModel", "voice_female_xiaohua");
jsonParam.put("realTimeSynParams", jsonObject);
//第三种
//list格式的"phones"字段封装成json数组:enclosure
String data = null;
ArrayList<HashMap<String, String>> enclosureList = new ArrayList<HashMap<String, String>>();
HashMap<String, String> tmpHash = new HashMap<String, String>();
tmpHash.put("phone", phonenum);
enclosureList.add(tmpHash);
JSONArray enclosure = JSONArray.parseArray(JSON.toJSONString(enclosureList));
jsonParam.put("phones", enclosure);