Answers for "how to return json file in python"

9

json load from file python 3

import json

with open('file_to_load.json', 'r') as file:
  data = json.load(file)
Posted by: Guest on May-07-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 "how to return json file in python"

Code answers related to "Javascript"

Browse Popular Code Answers by Language