1import json
2
3with open('path_to_file/person.json') as f:
4 data = json.load(f)
1import json
2
3with open('path_to_file/person.json') as f:
4 data = json.load(f)
5
6print(data)
1#this code helps translate JSON file
2#to a dictionary
3
4import json
5
6person = '{"name": "Bob", "languages": ["English", "Fench"]}'
7person_dict = json.loads(person)
8
9print( person_dict)
10
11print(person_dict['languages'])