def FriendRequestToJson(requesting_author, requested_author):
    """
    Converts a Friend Request object into a JSON-compatible dictionary.
    Return None on failure.
    """
    if not requesting_author:
        return None

    if not requested_author:
        return None

    try:
        json_dict = {
            "type":"Follow",
            "summary": requesting_author['displayName'] + " wants to follow " + requested_author['displayName'],
            "actor":requesting_author,
            "object":requested_author,
            
        }
        return json_dict
    except:
        return None