import json
with open('path_to_file/person.json') as f:
data = json.load(f)
# Python program to read
# json file
import json
# Opening JSON file
f = open('data.json')
# returns JSON object as
# a dictionary
data = json.load(f)
# Iterating through the json
# list
for i in data['emp_details']:
print(i)
# Closing file
f.close()
import json
with open('Json file') as read:
read_json = json.load(read)
#this code helps translate JSON file
#to a dictionary
import json
person = '{"name": "Bob", "languages": ["English", "Fench"]}'
person_dict = json.loads(person)
print( person_dict)
print(person_dict['languages'])