Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 311 Bytes

read-json-file.md

File metadata and controls

17 lines (14 loc) · 311 Bytes
title description author tags
Read JSON File
Reads a JSON file and parses its content.
e3nviction
json,file,read
import json

def read_json(filepath):
    with open(filepath, 'r') as file:
        return json.load(file)

# Usage:
read_json('data.json') # Returns: Content of file as dict