Skip to content
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

[SR-9730] JSONDecoder cannot parse string with escaping characters #3552

Closed
swift-ci opened this issue Jan 23, 2019 · 2 comments
Closed

[SR-9730] JSONDecoder cannot parse string with escaping characters #3552

swift-ci opened this issue Jan 23, 2019 · 2 comments

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-9730
Radar None
Original Reporter levantAJ (JIRA User)
Type Bug
Status Closed
Resolution Invalid
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug, Codable
Assignee None
Priority Medium

md5: 81842b83f3f464136651753b45bbab7c

Issue Description:

I cannot parse the JSON with kind of this value:

{
    "pattern": "^(?:(http|https):[\\/]{2})(?:www\\.|special\\.)qoo10\\.sg\\/?"
}

JSONDecoder always throw an error:

"dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "The given data was not valid JSON.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "Invalid escape sequence around character xxx." UserInfo={NSDebugDescription=Invalid escape sequence around character xxx.})))"

@belkadan
Copy link

Do you have a self-contained example (a SwiftPM package or Xcode project)?

Is this on an Apple OS or Linux?

cc @itaiferber

@swift-ci
Copy link
Contributor Author

Comment by Tai Le (JIRA)

This for Apple OS, but sorry this is my mistake, I'm going to close this ticket.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants