1、代码
1 gameListStr = "[{"gameId":"1","gameName":"哈哈"},{"gameId":"2","gameName":"呵呵"}]";2 ListgameList = JSONObject.parseArray(gameListStr, Game.class);
1 public class Game { 2 public String gameId; 3 public String gameName; 4 5 public String getGameId() { 6 return gameId; 7 } 8 9 public void setGameId(String gameId) {10 this.gameId = gameId;11 }12 13 public String getGameName() {14 return gameName;15 }16 17 public void setGameName(String gameName) {18 this.gameName = gameName;19 }20 }