Java 解析Json字符串

xiaoxiao2021-02-28  134

import net.sf.json.JSONArray; import net.sf.json.JSONObject; //FPInfo--->StrJson JSONObject jsonObject = JSONObject.fromObject(FPInfo); if(jsonObject.has("list")){ JSONArray array=jsonObject.getJSONArray("list"); for(int i=0;i<array.size();i++){ JSONObject subObject=array.getJSONObject(i); if(subObject.get("name2").toString().equals("价税合计")){ JSHJ=subObject.get("value").toString(); break; } }
转载请注明原文地址: https://www.6miu.com/read-25564.html

最新回复(0)