2025年json解析

json解析thistimeawar 1 570 awardpeoples 6 mpmdocid 00016bcfcbc5 prondaward 5 910

大家好,我是讯享网,很高兴认识大家。
[{     "thistimeaward": "1.570",     "awardpeoples": "6",     "mpmdocid": "00016bcfcbc55603",     "prondaward": "5.910",     "willawardlimit": "5.910",     "fileurl": "http://192.168.43.142:8282/2BMPM/project/apply/PerformanceAppraisal/showSelectPerfirmance.do?selectIds=000bf132",     "draftdept": null,     "onitem": "A1FYY",     "draftman": "ebdd1",     "alreadyaward": "0.000",     "users": "[{"name":"ebdd1","department":Q,"type":"负责人","assignedaward":"3900.00"},     {"name":"zhangsan","department":W,"type":"核心骨干","assignedaward":"1600.00"},     {"name":"zgbld1","department":E,"type":"负责人","assignedaward":"3500.00"},     {"name":"jsfzr1","department":F,"type":"负责人","assignedaward":"3500.00"},     {"name":"zgcld1","department":S,"type":"负责人","assignedaward":"1600.00"},     {"name":"lisi1","department":C,"type":"负责人","assignedaward":"1600.00"}]"      }] try { JSONArray jsonArray = new JSONArray(json); for (int i = 0; i < jsonArray.length(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); String mpmdocid = jsonObject.getString("mpmdocid"); String draftman = jsonObject.getString("draftman"); String draftdept = jsonObject.getString("draftdept"); String fileurl = jsonObject.getString("fileurl"); String prondaward = jsonObject.getString("prondaward"); String willawardlimit = jsonObject.getString("willawardlimit"); String alreadyaward = jsonObject.getString("alreadyaward"); String onitem = jsonObject.getString("onitem"); String awardpeoples = jsonObject.getString("awardpeoples"); String thistimeaward = jsonObject.getString("thistimeaward"); JSONArray jsonArray1 = new JSONArray(jsonObject.getString("users")); for (int j = 0; j < jsonArray1.length(); j++) { JSONObject jsonObject1 = jsonArray1.getJSONObject(j); String name = jsonObject1.getString("name"); String department = jsonObject1.getString("department"); String type = jsonObject1.getString("type"); String assignedaward = jsonObject1.getString("assignedaward"); } } } catch(Exception e) { e.printStackTrace(); }

讯享网
小讯
上一篇 2025-01-08 21:59
下一篇 2025-02-24 19:15

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/134984.html