with open json file 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 file json
with open('file.txt', 'r') as f:
data = f.read()
import json
with open('data.txt') as json_file:
data = json.load(json_file)
with open('file.txt', 'r') as f:
data = f.read()