json操作 in work

net.sf.json
JSONObject jsonObject = (JSONObject)httpTransService.sendReq("queryGuidByBuildingCode",map,method).get("data");
JSONArray jsonArray = (JSONArray)jsonObject.get("data");
            for(int i=0;i<jsonArray.size();i++) {
                if(StringUtils.isEmpty(JSONObject.fromObject(jsonArray.get(i)).get("bulidingGuid"))){
                    continue;
                }
                String bulidingGuid = JSONObject.fromObject(jsonArray.get(i)).get("bulidingGuid")==null?"":JSONObject.fromObject(jsonArray.get(i)).get("bulidingGuid").toString();

猜你喜欢

转载自blog.csdn.net/qq_24271537/article/details/115019724