import com.alibaba.fastjson.JSON; String strjson = request.getParameter("param"); //url-json的转码解码 String urlJson = URLEncoder.encode(strjson, "UTF-8"); String strJson = URLDecoder.decode(urlJson, "UTF-8"); //fastjson的转码解码 Map<String, Object> paramlist = (Map<String, Object>) JSON.parse(strjson); String jsonStr = JSON.toJSONString(paramlist); //string和数组的转换,用,分割 String ipArray [] = {"192.168.1.16","192.168.1.17","192.168.1.18"} ; String str = StringUtils.join(ipArray, ","); String [] strArr= str.split(",");
over
时间: 2024-10-01 04:37:00