问题是:
我在文件夹中有一系列文件json_data = open("C:/Users/Desktop/soccer_data2/*.json")
像这样:
a-01.json
a-02.json
a-03.json
a-01.json :
{'blabla': '127',
'blabla': 'Sun,,26,Oct,2014',
'events': [{'outcome': 'save',
'playerId': 124,
'position': ['0,50'],
'teamId': 16,
'timestamp': 294,
'type': 'goal_keeping'},
{'outcome': 'save',
'playerId': 434,
'position': ['0,50'],
'teamId': 19,
'timestamp': 744,
'type': 'goal_keeping'},
a-02.json :
{'away_team': '112',
'date': 'Sun,,27,Oct,2014',
'events': [{'outcome': 'save',
.
我想将所有文件合并到一个json中。 有可能吗? 感谢大家
这只是我在这里编写的一个模板,没有经过测试,因此可能有一些错误或打字错误,如果有人有意见,我将不胜感激。
相关问题 更多 >
编程相关推荐