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

Fix encoding of json keys that contain utf-8 characters #2508

Merged

Conversation

valentin-panalyt
Copy link
Contributor

As discussed in discord, this PR aims to fix the case where a json key contains UTF-8 characters, which are then not correctly encoded by jsoniter, leading to invalid json in the (http) response.

Copy link
Collaborator

@kyri-petrou kyri-petrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit sad we have to do this, but unless we can differentiate between ObjectValues that originate from custom scalars to those that originate from the schema itself, I can't think of another way. While differentiating is possible, it will make the code more complex and I don't think we should do it simply for improving json encoding performance.

@kyri-petrou
Copy link
Collaborator

@ghostdogpr happy to merge in if you're also happy with it

@ghostdogpr ghostdogpr merged commit c32b811 into ghostdogpr:series/2.x Jan 10, 2025
10 checks passed
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.

3 participants