how to open read and print json 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: python json dump to file
import json
with open('data.json', 'w') as f:
json.dump(data, f)