import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

   String str = "{FYXID:4C4600835174411190C739805DE593BC,ZFY:0,FYXMC:保安保洁费}";
        JSONObject jsonObject = new JSONObject(str);
        Iterator it = jsonObject.keys();
        while(it.hasNext()){
            String key = (String) it.next();// 获得key
            String value = jsonObject.getString(key);// 获得value
            System.out.println("[key="+key+" val="+value+"]");
        }

GitHub 加速计划 / js / json
55
5
下载
适用于现代 C++ 的 JSON。
最近提交(Master分支:25 天前 )
7421ac31 Changed the example code in the documentation from copy initialization to direct initialization for `json::json_pointer`. This prevents compilation errors caused by the constructor being explicit. 22 小时前
4b17f90f Added examples and modified the corresponding documents and unit tests. Signed-off-by: chirsz-ever <chirsz-ever@outlook.com> Co-authored-by: Niels Lohmann <niels.lohmann@gmail.com> 1 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐