from pathlib import Path
import json
from typing import OrderedDict


def read_json(fname):
    """Read a JSON file."""

    fname = Path(fname)
    with fname.open('rt') as handle:
        return json.load(handle, object_hook=OrderedDict)