Answers for "python return from json file"

89

python read json file

import json

with open('path_to_file/person.json') as f:
  data = json.load(f)

print(data)
Posted by: Guest on April-08-2020
0

reading the JSON from a JSON file

import json
with open("sample_data.json", "r") as file:
    data = json.load(read_file)
    print(data)
Posted by: Guest on March-23-2022

Code answers related to "python return from json file"

Python Answers by Framework

Browse Popular Code Answers by Language