拉勾數(shù)據(jù)分析實(shí)戰(zhàn)訓(xùn)練營
對象與JSON互轉(zhuǎn)
OrderCmd orderCmd = new OrderCmd();//對象轉(zhuǎn)JSOnString orderJson = JSON.toJSONString(orderCmd);//JSON轉(zhuǎn)對象OrderCmd orderCmd = JSONObject.parseObject(orderJson, OrderCmd.class);
標(biāo)簽:
OrderCmd orderCmd = new OrderCmd();//對象轉(zhuǎn)JSOnString orderJson = JSON.toJSONString(orderCmd);//JSON轉(zhuǎn)對象OrderCmd orderCmd = JSONObject.parseObject(orderJson, OrderCmd.class);