-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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-6163] JSONDecoder cannot decode RFC 7159 JSON #4402
Comments
@swift-ci Create |
As is discussed in https://forums.swift.org/t/top-level-t-self-encoded-as-number-json-fragment/11001, if we choose to, we can resolve this either on the |
Comment by Vasily Anisimov (JIRA) Hello! Any progress on this issue? |
Yes, work has been ongoing internally, but I can't speak to the specifics here. |
This appears to be resolved with the latest macOS and iOS.
But I can't see any relevant changes in the implementation or unit tests. |
Comment by Andrey Yakushev (JIRA) Looks like @benrimmington is right. Rechecked right now: tests are successful with Xcode 11 on iOS 13.1 and fail on iOS 10.3.1. |
Comment by Chris Ballinger (JIRA) As @benrimmington said, it looks like the open source release of Swift's Darwin JSONEncoder/JSONDecoder has not been updated to reflect this change, and doesn't match the stdlib that is being shipped with iOS 13: I guess Apple is shipping a private fork and forgot to upstream the fix? |
Comment by Chris Ballinger (JIRA) I made a small PR that updates the open source stdlib to match the behavior of the one shipping with iOS 13: swiftlang/swift#28818 |
Darwin:
Other platforms: |
Comment by Diogo Tridapalli (JIRA) It's fixed on Xcode 11.4. |
SR-12275 has been resolved. |
Additional Detail from JIRA
md5: 7ea104c1b9f4df36ef6d428fc2c7cfd0
is duplicated by:
relates to:
Issue Description:
For example
Is valid RFC 7159 JSON. This can be parsed using the JSONSerializer like so
But there is no way to use the allowFragments option for JSONDecoder.
The text was updated successfully, but these errors were encountered: