read json files code example
Example 1: python read json file
import json
with open('path_to_file/person.json') as f:
data = json.load(f)
print(data)
Example 2: read file json
with open('file.txt', 'r') as f:
data = f.read()
import json
with open('path_to_file/person.json') as f:
data = json.load(f)
print(data)
with open('file.txt', 'r') as f:
data = f.read()