from pathlib import Path
import json
from typing import OrderedDict


def read_json(fileName):
    """
    Function to read a JSON file.

    Parameters
    ----------
    fileName    : str
                  Name of the JSON file

    Returns
    -------
    content     : OrderedDict
                  JSON file content
    """
    fileName = Path(fileName)
    with fileName.open('r') as jsonFile:
        return json.load(jsonFile, object_hook=OrderedDict)