【发布时间】:2018-08-24 01:23:12
【问题描述】:
"Data": [{
"timeLive": "74",
"halfTimeScore": "0 - 0",
"fullTimeScore": null,
"firstTeamToScore": null,
"homeTeamInfo": {
"homeTeam": "Atlético Mineiro",
"homeGoals": "0",
"homeGoalsHalfTime": "0",
"homeCorners": "9",
"homeYellowCards": "1",
"homeRedCards": "0",
"homeShotsGol": "3",
"homeShotsFora": "9",
"homeAttacks": "131",
"homeDangerousAttack": "49",
"homePossession": "74",
"homeFouls": 13,
"avgGoalsHome": 2.1,
"teamID": "43669",
"homeTeamForm": {
"position": "6",
"points": "33",
"form": [
"W",
"D",
"L",
"W",
"W"
]
}
},
"awayTeamInfo": {
"awayTeam": "Vasco da Gama",
"awayGoals": "0",
"awayGoalsHalfTime": "0",
"awayCorners": "1",
"awayYellowCards": "3",
"awayRedCards": "0",
"awayShotsGol": "3",
"awayShotsFora": "4",
"awayAttacks": "58",
"awayDangerousAttack": "21",
"awayPossession": "26",
"awayFouls": 14,
"avgGoalsAway": 0.9,
"teamID": "43663",
"awayTeamForm": {
"position": "15",
"points": "20",
"form": [
"W",
"L",
"L",
"L",
"D"
]
}
},
"head2head": {
"draws": 3,
"homeWins": 6,
"awayWins": 6,
"avgGolsH2H": 2.3
},
"matchEvents": [{
"eventName": "Card",
"eventType": "Yellow card",
"eventTeam": "Away",
"eventTime": 72,
"eventPlayer": {
"playerName": "Martín Silva",
"playerShortName": "M. Silva",
"playerID": "547DD"
},
"eventSubIn": null,
"eventSubOut": null,
"eventHomeTeam": false
}
]
我有课,但我不知道如何从 json 转换为 gridview 有人可以举个例子吗
【问题讨论】:
-
1.制作类来表示您的数据(或在 Visual Studio 中使用“特殊粘贴”)。 2. 将 JSON 反序列化为您的类。