Answers for "python how to read json from a file"

3

read json file

# Python program to read JSON
# from a file
  
  
import json
  
# Opening JSON file
with open('sample.json', 'r') as openfile:
  
    # Reading from json file
    json_object = json.load(openfile)
  
print(json_object)
print(type(json_object))
Posted by: Guest on January-08-2022

Code answers related to "python how to read json from a file"

Python Answers by Framework

Browse Popular Code Answers by Language