import json
with open('/tmp/data.json') as f:
obj = json.load(f)
- /tmp/data.json - path to JSON file
- json.load - parse json object in file and gives result in dictionary
group: json
import json
with open('/tmp/data.json') as f:
obj = json.load(f)
print(obj)
{'test': 1}
group: json