import json
import logging


def parse_json_to_dict(text_data):
    """parse json-containing text, return a python dictionary"""
    try:
        results = json.loads(text_data)
        return results
    except:
        #print('error parsing json result: {}'.format(sys.exc_info()[0]))
        logging.exception('unexpected error parsing json result')
        return {}