我最近使用的Train状态API在JSON对象中添加了两个额外的键值对(has_arrived,has_departed),这导致我的脚本崩溃.
这是字典:
{
"response_code": 200,
"train_number": "12229",
"position": "at Source",
"route": [
{
"no": 1,
"has_arrived": false,
"has_departed": false,
"scharr": "Source",
"scharr_date": "15 Nov 2015",
"actarr_date": "15 Nov 2015",
"station": "LKO",
"actdep": "22:15",
"schdep": "22:15",
"actarr": "00:00",
"distance": "0",
"day": 0
},
{
"actdep": "23:40",
"scharr": "23:38",
"schdep": "23:40",