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

What should the return type of json.dumps be? #185

Open
clayg opened this issue Mar 8, 2017 · 1 comment
Open

What should the return type of json.dumps be? #185

clayg opened this issue Mar 8, 2017 · 1 comment

Comments

@clayg
Copy link

clayg commented Mar 8, 2017

Upstream is struggling to get this right:

https://bugs.python.org/issue19837

People that want to support py2 & py3 are probably typing

json.dumps(obj).decode('utf-8')

can/should six offer support here? Is there a place for a from six import json that supports a consistent return type regardless of your python version?

@clayg
Copy link
Author

clayg commented Mar 8, 2017

FWIW I think in py3.6 json.loads will transparently accept bytes again...

python/cpython@b161562

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