def get_json(request_obj, remove_token=True):
    """
    This function is responsible for getting the json data that was sent with
    with a request or return an empty dict if no data is sent

    Args:
    ~~~~~
        request_obj: request object that data should be attached to

    Returns:
    ~~~~~~~~
        dict
    """
    result = {}
    if not hasattr(request_obj, 'json') or not request_obj.json:
        if hasattr(request_obj, 'params'):
            result = request_obj.params

    result = request_obj.json or {}

    if remove_token and 'token' in result:
        del result['token']

    return result