from pathlib import Path
import json


def read_json_file(path):
    """Read json from a file"""
    path = Path(path)
    try:
        with path.open("r") as file:
            json_file = json.load(file)
            return json_file
    except FileNotFoundError as e:
        print("File not found.")