String sJson = "[{'player_id':'301601055','coin':'2','result':'1'},{'player_id':'301601056','coin':'2','result':'1'},{'player_id':'301601057','coin':'4','result':'1'}]";
JSONArray jsonArray = (JSONArray) JSONSerializer.toJSON( sJson );
system.out.println(jsonArray);
输出:[{"player_id":"301601055","coin":"2","result":"1"},{"player_id":"301601056","coin":"2","result":"1"},{"player_id":"301601057","coin":"4","result":"1"}]
本文详细解释了如何解析JSON字符串并将其转换为JSONArray,然后通过遍历输出JSONArray中的元素。
200

被折叠的 条评论
为什么被折叠?



