def _decode_json_int(o):
    """_decode_json_int
    Loads integers in a json as int. Pass in as parameter `object_hook` for
    `json.load`.
    """
    if isinstance(o, str):
        try:
            return int(o)
        except ValueError:
            return o
    elif isinstance(o, dict):
        return {_decode_json_int(k): _decode_json_int(v) for k, v in o.items()}
    elif isinstance(o, list):
        return [_decode_json_int(v) for v in o]
    else:
        return o