-
Notifications
You must be signed in to change notification settings - Fork 180
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
JSON becomes malformed when trying to write string containing \\u0000
#475
Comments
If slick-pg can carefully remove null characters in strings, it would be nice; otherwise IMO it should not touch JSON after it is stringified. |
@susisu fixed, pls help check. BTW,
|
@tminglei Thank you for quick response.
I mean JSON string |
In addition, string like |
@susisu I did a re-fix try, can you help check again? |
@tminglei Thanks! It is pretty good for How about using regex like |
Regex will fail, I didn't find a useable regex. |
Yes, the exact regex that matches |
Maybe it becomes a bit complex if using regex etc., and I think it can be a reasonable way to not touch JSON after stringified. |
now, |
I expected this result, but d2731f4 will yield |
@tminglei Looks good enough. Thanks! |
If input JSON has a string containing a sequence
\\u0000
, due to #348, the part\u0000
is removed and the escape character\
is left, and this possibly causes error.For example, when trying to write a JSON
{ "xxx": "***\\u0000***" }
, I got the following error.The text was updated successfully, but these errors were encountered: