Skip to content

feat: Avoid escaping non-ASCII characters when using json.dumps() #160

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LTaooo
Copy link

@LTaooo LTaooo commented Jun 5, 2025

Describe your changes

Avoid escaping non-ASCII characters when using json.dumps()

print(json.dumps({'你23实际': '世界速度'})) # output: {"\u4f6023\u5f00\u53d1": "\u4e16\u754c\u957f\u5ea6"}
print(json.dumps({'你23实际': '世界速度'}, ensure_ascii=False)) # output: {"你23实际": "世界速度"}

Issue ticket number and link (if applicable)

Screenshots of the feature / bugfix

Checklist before requesting a review

  • Added relevant tests
  • Run ruff & mypy
  • All tests pass

@LTaooo LTaooo closed this Jun 5, 2025
@LTaooo LTaooo reopened this Jun 5, 2025
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.

1 participant