if not isinstance(dictionary, dict):
    return dictionary
return dict((str(k), convert_keys_to_string(v)) for k, v in list(dictionary.items()))
Fastest way to convert a dict's keys & values from `unicode` to `str`?