import re
import json


def dict_from_json_text(json_text, fix_ampersands=False):
    """
    Convert a json string to a dictionary of values
    :param json_text: valid json string
    :param fix_ampersands: additionally replace & to &amp; encoded value before parsing
    :return: dictionary of data
    """
    if fix_ampersands:
        json_text = re.sub(r'&', '&amp;', json_text)
    return json.loads(json_text)