import json


def load_json(path, deserializer=None):
    """Load an object from a JSON file, optionally with a custom deserializer"""
    with open(path, 'r') as jf:
        data = json.load(jf, object_hook=deserializer)
    return data