Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safe_dict(d) has same error as old dajaxice project #159

Open
DesMas opened this issue Oct 19, 2016 · 0 comments
Open

safe_dict(d) has same error as old dajaxice project #159

DesMas opened this issue Oct 19, 2016 · 0 comments

Comments

@DesMas
Copy link

DesMas commented Oct 19, 2016

Hi
I can see the same error preventing JS calls sending arguments
"Recursively clone json structure with UTF-8 dictionary keys: http://www.gossamer-threads.com/lists/python/bugs/684379":
def safe_dict(d): """ Recursively clone json structure with UTF-8 dictionary keys http://www.gossamer-threads.com/lists/python/bugs/684379 """ if isinstance(d, dict): return dict([(k, safe_dict(v)) for k, v in d.items()]) #return dict( # [(k.encode('utf-8'), safe_dict(v)) for k, v in d.iteritems()]) elif isinstance(d, list): return [safe_dict(x) for x in d] else: return d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant