📅  最后修改于: 2022-03-11 15:02:34.880000             🧑  作者: Mango
import json
def parse(filename):
try:
with open(filename) as f:
return json.load(f)
except ValueError as e:
print('invalid json: ' + filename)
return None # or: raise