@classmethod
def raw_results_to_json(cls, raw_text, delim=','):
    """Converts raw BLAST text into a flatten dictionary.

        :param raw_text: raw text from BLAST results
        :type raw_text: basestring
        :param delim: delimiter for parsing
        :type delim: basestring
        :return: flattened dictionary
        :rtype: dict
        """
    if raw_text.strip() == '':
        return []
    meta = cls._extract_metadata(raw_text, delim)
    fields = meta['fields']
    if fields is None:
        return []
    alignment_rows = cls._get_alignment_rows(raw_text)
    match_dicts = cls._validate_matches(alignment_rows, tuple(fields))
    data = list(cls.__clean_json(match_dicts))
    return data
