escapeString compatibility with encoding/json#87
Open
barkyq wants to merge 6 commits intovalyala:masterfrom
Open
escapeString compatibility with encoding/json#87barkyq wants to merge 6 commits intovalyala:masterfrom
barkyq wants to merge 6 commits intovalyala:masterfrom
Conversation
and `encoding/json` from standard library
it is in range 0x23-0x5B see page 8 of: https://www.rfc-editor.org/rfc/rfc8259.html this should not be a problem though, if the unescape is applied to properly escaped json data
This reverts commit 7a86309.
|
This seems a valid fix...@valyala do you think this can be merged? |
|
@barkyq could you add tests? |
klondikedragon
added a commit
to klondikedragon/fastjson
that referenced
this pull request
Sep 1, 2024
Tests for string escape conformance with standard lib
|
I've added tests in aperturerobotics#2 -- since this repo doesn't seem to be merging PRs in last few years I'm hopeful that it could be merged in this other recent fork (https://github.com/aperturerobotics/fastjson/ - no affiliation). I'd be just as happy seeing these changes merged here too. The lack of proper string escaping can pretty seriously break using serialized JSON when sending it to other systems that are not as forgiving with input characters. |
paralin
pushed a commit
to aperturerobotics/fastjson
that referenced
this pull request
Sep 8, 2024
Tests for string escape conformance with standard lib
papanikge
added a commit
to panther-labs/fastjson
that referenced
this pull request
Oct 10, 2024
papanikge
added a commit
to panther-labs/fastjson
that referenced
this pull request
Oct 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Edited parser.go to escape strings according to RFC8259