(query_dict, domain, string_type_params)
return request_dict
Transform the given QueryDict to a normal dict where each value has been
    converted from a string to a dict (if the value is JSON). params with values 'true'
    or 'false' or numbers are casted to respective datatypes, unless the key is specified in string_type_params
    Also add the domain to the dict.

    :param query_dict: a QueryDict
    :param domain:
    :string_type_params: list of params that should not be autocasted to boolean/numbers
    :return: a dict
Transform the given QueryDict to a normal dict where each value has been
    converted from a string to a dict (if the value is JSON). params with values 'true'
    or 'false' or numbers are casted to respective datatypes, unless the key is specified in string_type_params
    Also add the domain to the dict.
Transform the given QueryDict to a normal dict where each value has been converted from a string to a dict ( if the value is JSON ) . params with values true or false or numbers are casted to respective datatypes unless the key is specified in string_type_params Also add the domain to the dict .
def query_dict_to_dict(query_dict, domain, string_type_params):
    """
    Transform the given QueryDict to a normal dict where each value has been
    converted from a string to a dict (if the value is JSON). params with values 'true'
    or 'false' or numbers are casted to respective datatypes, unless the key is specified in string_type_params
    Also add the domain to the dict.

    :param query_dict: a QueryDict
    :param domain:
    :string_type_params: list of params that should not be autocasted to boolean/numbers
    :return: a dict
    """
    request_dict = json_request(query_dict)
    request_dict['domain'] = domain

    # json.loads casts strings 'true'/'false' to booleans, so undo it
    for key in string_type_params:
        if key in query_dict:
            vals = query_dict.getlist(key)
            if len(vals) > 1:
                request_dict[key] = vals
            else:
                request_dict[key] = vals[0]
    return request_dict
def query_dict_to_dict ( query_dict , domain , string_type_params ) : request_dict = json_request ( query_dict ) request_dict [ 'domain' ] = domain # json.loads casts strings 'true'/'false' to booleans, so undo it for key in string_type_params : if key in query_dict : vals = query_dict . getlist ( key ) if len ( vals ) > 1 : request_dict [ key ] = vals else : request_dict [ key ] = vals [ 0 ] return request_dict