首页 > 其他分享 >Test

Test

时间:2022-11-17 19:33:20浏览次数:38  
标签:11 String jsonObject commonCategorylv2 Test null

1 @Test
2     public void test12() {
3         String a = "[{\"screenType\":null,\"scenarioType\":null,\"viewType\":null,\"id\":\"31515\",\"ids\":null,\"batches\":null,\"tableFlag\":null,\"commonDescription\":null,\"commonDescriptionCn\":null,\"commonDisplay\":null,\"commonNo\":\"SCRM2022111024696\",\"commonHeadline\":\"欧供分销延误风险自动感知2022-11-10\",\"commonHeadlineCn\":null,\"commonDisplayCn\":null,\"commonBcmflag\":\"0\",\"commonCardtype\":null,\"commonOccuancedate\":\"2022-11-10 03:32:03\",\"riskPredictedRealtimeLoss\":null,\"riskIdentifiedLoss\":null,\"businessDomain\":null,\"commonRdcName\":null,\"commonBgKey\":null,\"commonIncreasewayDesc\":\"system\",\"commonIocRiskDesc\":\"否\"}]";
4         JSONArray jsonArray = JSONArray.parseArray(a);
5         JSONObject jsonObject = (JSONObject) jsonArray.get(0);
6         String commonCategorylv2 = jsonObject.getString("commonCategorylv2");
7         System.out.println(commonCategorylv2);
8     }

 

标签:11,String,jsonObject,commonCategorylv2,Test,null
From: https://www.cnblogs.com/mingruifeng/p/16900539.html

相关文章