-
Notifications
You must be signed in to change notification settings - Fork 4
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
Parse escaped chars #2
base: master
Are you sure you want to change the base?
Conversation
I've added some suggestions, and please add some tests for each of the scenarios and edge cases please |
I added a test for
results in
What do you mean? I can't see any comments or changes on the code. |
… \t, \r chars to test
They're comments on the code made on this pull request, see here: #2 |
I'm sorry but I can't see any comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, apparently I left this in draft
@@ -596,7 +596,29 @@ open class JSON { | |||
} | |||
} | |||
|
|||
let parsedString = String(jsonString[startingIndex ..< index]) | |||
var parsedString = String(jsonString[startingIndex ..< index]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could stay as a constant and be given a different name and built upon, e.g.
let initialParsedString = String()
let parsedString = initialParsedString.someOperation()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is useful. I mean how would you implement this for the hexEncodedUnicodeCharRegex
parsedString
? Feel free to push your solution on this branch.
Hi! First of all, thanks for this library!
I noticed that it does not parse escaped chars like
\n
or\u00fc
(ü), see here.This change adds support for those escaped values.