Skip to content

[SR-16097] JSONDecoder().superDecoder(keyedBy:) discrepancy #3169

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

Closed
adam-fowler opened this issue Apr 5, 2022 · 0 comments · Fixed by #3167
Closed

[SR-16097] JSONDecoder().superDecoder(keyedBy:) discrepancy #3169

adam-fowler opened this issue Apr 5, 2022 · 0 comments · Fixed by #3167

Comments

@adam-fowler
Copy link
Contributor

Previous ID SR-16097
Radar None
Original Reporter @adam-fowler
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: 5d1e83f448a534309a0a99cc00746509

Issue Description:

On macOS if you call

JSONDecoder().superDecoder(keyedBy: .key)

and there are no values for that key it still returns a Decoder.

On Linux it will throw a DecodingError.keyNotFound error.

I would expect that both platforms are consistent.

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

Successfully merging a pull request may close this issue.

1 participant