-
Notifications
You must be signed in to change notification settings - Fork 622
Correctly escape ASCII control characters in strings #65
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
Conversation
|
Sorry, I wrote the issue # wrong when I uploaded. |
This patch escapes ASCII control characters in the range 0x00...0x1f, in accordance with the JSON spec. Fixes serde-rs#51
|
Since you are concerned about execution speed, could you post some benchmarks before and after? |
Here are the most noticeable between the last common commit and #58 Here are the most noticeable between the last common commit and #65 Conclusion: |
|
After some tests, the difference really comes from the fact that fewer characters are escaped than #58 . |
|
Thanks @PaulGrandperrin for the benchmarks! I was planning to do them but didn't get around to it. |
|
Yay! |
This patch escapes ASCII control characters in the range 0x00...0x1f, in accordance with the JSON spec.
Fixes #51