Skip to content

When serializing, preserve Unicode information - #574

Closed
ponponon wants to merge 0 commit into
Delgan:masterfrom
ponponon:master
Closed

ponponon wants to merge 0 commit into
Delgan:masterfrom
ponponon:master

Conversation

@ponponon

Copy link
Copy Markdown
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

Delgan commented Jan 21, 2022 •

Copy link
Copy Markdown
Owner

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