Template request | Bug report | Generate Data Product
Tags: #python #json #read #file #data #parse
Author: Sriniketh Jayasendil
Description: This notebook will demonstrate how to read a json file in Python.
References:
import json
file_name
: Name of the json file to be read
file_name = "data.json"
This function will read the json file and return the content as a dictionary.
def read_json_file(file_name):
with open(file_name) as json_file:
data = json.load(json_file)
return data
data = read_json_file(file_name)
print(data)