how to use json to load a file in python code example
Example 1: open json file python
import json
with open('data.txt') as json_file:
data = json.load(json_file)
Example 2: read json file python
import json
with open('path_to_file/person.json') as f:
data = json.load(f)
print(data)
flx = json.dumps(data, ensure_ascii=False, indent=4)
print(flx)