json解析转map

来源:互联网 发布:哪些网络公选课容易过 编辑:程序博客网 时间:2024/05/19 22:25
    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);
    }
0 0
原创粉丝点击