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

When serializing, preserve Unicode information #574

Closed
wants to merge 0 commits into from

Conversation

ponponon
Copy link
Contributor

I want to keep the original information of the Unicode code and not serialize it to ASCII

In [2]: json.dumps({"中文":"你好"})
Out[2]: '{"\\u4e2d\\u6587": "\\u4f60\\u597d"}'

In [3]: json.dumps({"中文":"你好"},ensure_ascii=False)
Out[3]: '{"中文": "你好"}'

@Delgan
Copy link
Owner

Delgan commented Jan 21, 2022

Hi @ponponon, thanks for the Pull Request!

Unfortunately, I messed with git while trying to update your branch to add unit tests... I'm sorry. 😬

Do you mind fixing the mistake I made please?

I force-pushed latest Delgan:master to ponponon:master without including your commit. Consequently, I'm unable to re-open this PR.
If you don't git pull the changes I made, you can git push --force your local master branch again. Alternatively you can just update your branch locally and re-apply the ensure_ascii=False fix.

Otherwise, we'll need to open a new Pull Request.

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

Successfully merging this pull request may close these issues.

2 participants