无法获取Json对象数组“ TradingFirm”

时间:2018-12-27 06:27:23

标签: java arrays json

尝试获取动态的json对象数组“ TradingFirm”,当我执行调试时,获取0,这不是真的,我无法解决问题,有人可以帮助我解决我在做什么错误

以下是请求有效载荷:

 assignedBroker: {brokerFirmId: 52, tradingFirmIds: [153], internal: true}
 brokerFirmId: 52
 internal: true
 tradingFirmIds: [153]
 0: 153
 coBrokers: []

String firm;

orderRequest.getParties().getAssignedBroker().setInternal(false);
        Broker coBroker = new Broker();

        if(firm.contains("IDB")) {

   coBroker.setBrokerFirmId(configuredFirms.get(firm.toString().trim()));
            coBroker.setTradingFirmIds(new ArrayList<Long>());
        }
        else if(firm.contains("TC")) {
            List<Long> tradingFirmIds = new ArrayList<Long>();
            tradingFirmIds.add(configuredFirms.get(firm.toString().trim()));
  //                coBroker.setBrokerFirmId(new Long());
            coBroker.setTradingFirmIds(tradingFirmIds);
        }
        orderRequest.getParties().getCoBrokers().add(coBroker);
        orderRequest.setState(State.WORKING.getStateCode());
    });   

0 个答案:

没有答案