-
Notifications
You must be signed in to change notification settings - Fork 21
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
Doubt about writeEscapedString() #8
Comments
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented Additionally, most JavaScript clients (erroneously) require the escaping of ALL line-terminating characters, which includes characters of the type java.lang.Character#LINE_SEPARATOR (currently only U+2028) and java.lang.Character#PARAGRAPH_SEPARATOR (currently only U+2029). Since JSON allows optional escaping of any character, the escaping of these problematic types of characters would be appreciated (see java.lang.Character.getType()). Here's a replacement for writeEscapedString() which does all that:
|
@glassfishrobot Commented |
|
There are some doubts about writeEscapedString(). This method
char c = s.charAt; but then at some place it compares c < 0x10FFFF.
But this test trivially always true since char data type is in the range
0x0000 to 0xFFFF. Is the intention of the code to use s.codePointAt()?
Environment
All
Affected Versions
[1.0.4]
The text was updated successfully, but these errors were encountered: