我有兩個(gè)list分別保存了兩個(gè)對(duì)象列表provinceList保存了省的信息(id,name),universityList保存了該省下的大學(xué)信息(id,name)】想將其轉(zhuǎn)換成如下格式的json字符串,應(yīng)該如何做????{"provinces":[?? ??? ??????????????? {"id":1,"name":"北京"},?? ??? ??????????????? {"id":2,"name":"上海"}????????????????????????...........?? ??? ?????????????? ],?? ??? ??? "universities":[?? ??? ???????????????? {"id":1, "name":北京大學(xué)},?? ??? ???????????????? {"id":2, "name":人民大學(xué)},?????????????????????????...........?? ??? ?????????????? ]?? ??? ?? }
對(duì)象轉(zhuǎn)換為json對(duì)象
央央
2016-09-30 15:47:41