如何接收json陣列
阿新 • • 發佈:2018-11-20
鍵值對之間要有空格
[ { "id": 1, //"id":和1之間要有空格 "creditCardId": 1361, "terminalId": 1, "terminalName": "APP", "isOnShelf": 1, "recommendOnTop": 1, "topOrder": 0, "bottomHotCard": 1, "bottomOrder": 0 }, { "id": 2, "creditCardId": 1361, "terminalId": 2, "terminalName": "H5信用卡管家", "isOnShelf": 1, "recommendOnTop": 1, "topOrder": 0, "bottomHotCard": 1, "bottomOrder": 0 }, { "id": 3, "creditCardId": 1361, "terminalId": 3, "terminalName": "H5異業合作-信用卡", "isOnShelf": 1, "recommendOnTop": 1, "topOrder": 0, "bottomHotCard": 1, "bottomOrder": 0 } ]
public BaseResult updateCreditCardMultieDisplayRuleSelective(@RequestParam(“creditCardDisplayRuleVOString”) String creditCardDisplayRuleVOString) {
log.info("creditCardDisplayRuleVO {}", creditCardDisplayRuleVOString); List<CreditCardDisplayRuleVO> creditCardDisplayRuleVOList = JSONObject.parseArray(creditCardDisplayRuleVOString, CreditCardDisplayRuleVO.class);