from typing import Union
from typing import Dict
import json


def json_load(fp: str) -> Union[Dict, None]:
    """Try loading json and return parsed dictionary. Returns None if file does not exists,
    or in case of a serialization error."""
    try:
        with open(fp, "r") as jf:
            _json = json.load(jf)
    except FileNotFoundError:
        return
    except json.JSONDecodeError:
        return
    else:
        return _json