欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

JSON快速取值(JAVA)

时间:2023-07-07
JSON快速取值(JAVA)

因为工作需要,经常要从复杂的json里面取值,每次要做写一堆JSONObject,然后我就写了一个小工具(刚毕业,写的很菜)。

工具代码

用了hutool的格式转换(Convert)、正则工具(ReUtil)和JSON工具

import cn.hutool.core.convert.Convert;import cn.hutool.core.util.ReUtil;import cn.hutool.json.*;import org.junit.Test;import java.util.ArrayDeque;import java.util.Arrays;import java.util.List;import java.util.Queue;public class JSONValuesUtil { private static String getValue(Queue queue, String jsonStr) { //如果队列为空就直接返回null if (queue.size() == 0) { return null; } JSONTokener jsonTokener = new JSONTokener(jsonStr,JSONConfig.create()); Object json = jsonTokener.nextValue(); //获取头部属性 String poll = queue.poll(); // 判断json类型 if (json instanceof JSONArray) { JSONArray jsonArray = (JSONArray) json; List all = ReUtil.findAll("\[(\d+)\]", poll, 1); if (all.size() > 0) { //如果是数组 String index = all.get(0); // 判断当前队列是否有值 有就递归没有就返回jsonString String str = jsonArray.getStr(Convert.toInt(index)); if (queue.peek() != null) { return getValue(queue, str); } else { return str; } } return null; } else { JSONObject jsonObject = (JSONObject) json; List all = ReUtil.findAll("\[(\d+)\]", poll, 1); if (all.size() > 0) { //如果是数组 String index = all.get(0); // 去除数组字段 (【0】) poll = poll.substring(0, poll.length() - index.length() - 2); // 判断当前队列是否有值 有就递归没有就返回jsonString if (queue.peek() != null) { return getValue(queue,jsonObject.getJSONArray(poll).getStr(Convert.toInt(index))); } else { return jsonObject.getJSONArray(poll).getStr(Convert.toInt(index)); } } else { // 如果是JSONObject // 判断当前队列是否有值 有就递归没有就返回jsonString if (queue.peek() != null) { return getValue(queue,jsonObject.getStr(poll)); } else { return jsonObject.getStr(poll); } } } } public static String format(String json, String formatStr) { String[] attributes = formatStr.split("\."); if (attributes.length == 0) { return null; } // 把数组转成队列(方便操作) Queue queue = new ArrayDeque<>(Arrays.asList(attributes)); return getValue(queue, json); } @Test public void test() { String json = "{"IsDeleteEntry":"true","IsVerifybaseDataField":"false","IsEntryBatchFill":"true","ValidateFlag":"true","NumberSearch":"true","IsAutoSubmitAndAudit":"false","Model":{"FAccountBookID":{"FNumber":"101"},"FBUSDATE":"2021-06-30","FDate":"2021-06-30","FVOUCHERGROUPID":{"FNumber":"PZZ5"},"FYEAR":2021,"FdocumentStatus":"Z","FISADJUSTVOUCHER":false,"FPERIOD":6,"FEntity":[{"FEXPLANATION":"石家庄区域2021年6月各校区转入人数","FACCOUNTID":{"FNumber":"607.02.02"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0007"},"FDETAILID__FFLEX7":{"FNumber":"SJ.00149"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":2,"FDEBIT":2},{"FEXPLANATION":"石家庄区域2021年6月各校区转入人数","FACCOUNTID":{"FNumber":"607.02.02"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ01067"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区转入人数","FACCOUNTID":{"FNumber":"607.02.02"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ01071"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":2,"FDEBIT":2},{"FEXPLANATION":"石家庄区域2021年6月各校区转入人数","FACCOUNTID":{"FNumber":"607.02.02"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0005"},"FDETAILID__FFLEX7":{"FNumber":"SJ01113"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区转入人数","FACCOUNTID":{"FNumber":"607.02.02"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0009"},"FDETAILID__FFLEX7":{"FNumber":"SY.00081"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":5,"FDEBIT":5},{"FEXPLANATION":"石家庄区域2021年6月各校区转入人数","FACCOUNTID":{"FNumber":"7777"},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":11,"FCREDIT":11},{"FEXPLANATION":"石家庄区域2021年6月各校区转出人数","FACCOUNTID":{"FNumber":"607.03.02"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0009"},"FDETAILID__FFLEX7":{"FNumber":"SJ.00015"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":5,"FDEBIT":5},{"FEXPLANATION":"石家庄区域2021年6月各校区转出人数","FACCOUNTID":{"FNumber":"607.03.02"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0004"},"FDETAILID__FFLEX7":{"FNumber":"SJ.001017"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区转出人数","FACCOUNTID":{"FNumber":"607.03.02"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0007"},"FDETAILID__FFLEX7":{"FNumber":"SJ.00149"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":2,"FDEBIT":2},{"FEXPLANATION":"石家庄区域2021年6月各校区转出人数","FACCOUNTID":{"FNumber":"607.03.02"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0009"},"FDETAILID__FFLEX7":{"FNumber":"SJ01057"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区转出人数","FACCOUNTID":{"FNumber":"607.03.02"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0009"},"FDETAILID__FFLEX7":{"FNumber":"SJ01058"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":2,"FDEBIT":2},{"FEXPLANATION":"石家庄区域2021年6月各校区转出人数","FACCOUNTID":{"FNumber":"607.03.02"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ01065"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":2,"FDEBIT":2},{"FEXPLANATION":"石家庄区域2021年6月各校区转出人数","FACCOUNTID":{"FNumber":"607.03.02"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ01071"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":2,"FDEBIT":2},{"FEXPLANATION":"石家庄区域2021年6月各校区转出人数","FACCOUNTID":{"FNumber":"607.03.02"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0005"},"FDETAILID__FFLEX7":{"FNumber":"SJ01088"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区转出人数","FACCOUNTID":{"FNumber":"607.03.02"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ01103"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区转出人数","FACCOUNTID":{"FNumber":"7777"},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":17,"FCREDIT":17},{"FEXPLANATION":"石家庄区域2021年6月各校区复课人数","FACCOUNTID":{"FNumber":"607.02.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0009"},"FDETAILID__FFLEX7":{"FNumber":"SJ.00015"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区复课人数","FACCOUNTID":{"FNumber":"607.02.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0008"},"FDETAILID__FFLEX7":{"FNumber":"SJ.01038"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区复课人数","FACCOUNTID":{"FNumber":"607.02.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ.01074"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":2,"FDEBIT":2},{"FEXPLANATION":"石家庄区域2021年6月各校区复课人数","FACCOUNTID":{"FNumber":"607.02.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ.01077"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区复课人数","FACCOUNTID":{"FNumber":"607.02.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0008"},"FDETAILID__FFLEX7":{"FNumber":"SJ01021"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区复课人数","FACCOUNTID":{"FNumber":"7777"},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":6,"FCREDIT":6},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"607.03.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0009"},"FDETAILID__FFLEX7":{"FNumber":"SJ.00015"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":2,"FDEBIT":2},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"607.03.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ.00245"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":4,"FDEBIT":4},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"607.03.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0004"},"FDETAILID__FFLEX7":{"FNumber":"SJ.00874"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"607.03.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0009"},"FDETAILID__FFLEX7":{"FNumber":"SJ.00888"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"607.03.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ.01027"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"607.03.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0007"},"FDETAILID__FFLEX7":{"FNumber":"SJ.01040"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":2,"FDEBIT":2},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"607.03.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ.01074"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":2,"FDEBIT":2},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"607.03.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0004"},"FDETAILID__FFLEX7":{"FNumber":"SJ.01079"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"607.03.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0008"},"FDETAILID__FFLEX7":{"FNumber":"SJ01021"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"607.03.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0008"},"FDETAILID__FFLEX7":{"FNumber":"SJ01056"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"607.03.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0009"},"FDETAILID__FFLEX7":{"FNumber":"SJ01063"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"607.03.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ01065"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":2,"FDEBIT":2},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"607.03.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ01100"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"607.03.03"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0009"},"FDETAILID__FFLEX7":{"FNumber":"SY.00081"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区休学人数","FACCOUNTID":{"FNumber":"7777"},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":21,"FCREDIT":21},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0009"},"FDETAILID__FFLEX7":{"FNumber":"SJ.00015"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":3,"FDEBIT":3},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0007"},"FDETAILID__FFLEX7":{"FNumber":"SJ.00149"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0005"},"FDETAILID__FFLEX7":{"FNumber":"SJ.00852"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0015"},"FDETAILID__FFLEX7":{"FNumber":"SJ.00998"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":2,"FDEBIT":2},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ.01027"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ.01074"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0004"},"FDETAILID__FFLEX7":{"FNumber":"SJ.01079"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0008"},"FDETAILID__FFLEX7":{"FNumber":"SJ.01090"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":2,"FDEBIT":2},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0004"},"FDETAILID__FFLEX7":{"FNumber":"SJ.01097"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0008"},"FDETAILID__FFLEX7":{"FNumber":"SJ01056"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ01065"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0009"},"FDETAILID__FFLEX7":{"FNumber":"SJ01072"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ01073"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0004"},"FDETAILID__FFLEX7":{"FNumber":"SJ01084"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ01091"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ01100"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ01103"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":3,"FDEBIT":3},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"607.02.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0009"},"FDETAILID__FFLEX7":{"FNumber":"SY.00081"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":3,"FDEBIT":3},{"FEXPLANATION":"石家庄区域2021年6月各校区实增人数","FACCOUNTID":{"FNumber":"7777"},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":26,"FCREDIT":26},{"FEXPLANATION":"石家庄区域2021年6月各校区实减人数","FACCOUNTID":{"FNumber":"607.03.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0001"},"FDETAILID__FFLEX7":{"FNumber":"SJ.01077"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实减人数","FACCOUNTID":{"FNumber":"607.03.01"},"FDetailID":{"FDETAILID__FFLEX5":{"FNumber":"04.01.008"},"FDETAILID__FF100005":{"FNumber":"0009"},"FDETAILID__FFLEX7":{"FNumber":"SJ01092"}},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":1,"FDEBIT":1},{"FEXPLANATION":"石家庄区域2021年6月各校区实减人数","FACCOUNTID":{"FNumber":"7777"},"FCURRENCYID":{"FNumber":"PRE001"},"FEXCHANGERATETYPE":{"FNumber":"HLTX01_SYS"},"FAMOUNTFOR":2,"FCREDIT":2}]}}n"; String formatStr = "Model.FEntity[0].FDetailID.FDETAILID__FFLEX5.FNumber"; String format = format(json, formatStr); System.out.println(format); }}

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。