json解析转map

   HashMap<String, Object> map = new HashMap<String, Object>();
    JSONObject jsonObject = net.sf.json.JSONObject.fromObject(values);
    
    Iterator keyIter = jsonObject.keys();
    String key;
    Object value;
    while( keyIter.hasNext())
    {
        key = (String)keyIter.next();
        value = jsonObject.get(key);
        map.put(key,value);
    }

 

转:http://blog.csdn.net/lisanjun520/article/details/25410803

posted @ 2015-08-28 14:13  manmanlu  阅读(549)  评论(0)    收藏  举报