json 数据分析

    /* 健一健康头条 */
        try {
            String url = "http://www.j1health.com/j1api.php/index/getJ1healthHotLists";
            url = PropertyConfigurer.getString("health_hot_url",url);
            String back = HttpRequestProxy.doPost(url, new HashMap(), "UTF-8");
            JSONObject json = new JSONObject();
            if (!StringUtil.isEmpty(back)) {
                JSONObject object = JSONObject.fromObject(back);
                if(object.containsKey("status")&&object.getInt("status")==0){
                    JSONArray arr = object.getJSONArray("hotLists");
                    if(arr.size()>0){
                        json = JSONObject.fromObject(arr.get(0));
                    }
                }
            }
            resultObj.put("healthHot", json);
        } catch (Exception e) {
            logger.error("获取健一健康头条失败,异常信息message=" + e.getMessage());
            resultObj.put("healthHot", new JSONObject());
        }
        
上一篇:BW基于ALE的主数据增量机制分析


下一篇:Apache2.4卡住无法访问的解决……