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-8065] Allow decoding from NSDictionarys/NSArrays with PropertyListDecoder #3671

Open
swift-ci opened this issue Jun 21, 2018 · 0 comments

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-8065
Radar None
Original Reporter jayrhynas (JIRA User)
Type New Feature
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels New Feature, Codable
Assignee None
Priority Medium

md5: 1c710bc510dc460690e0063740984094

Issue Description:

Currently, PropertyListDecoder can only decode from instances of Data.
Internally, it calls PropertyListSerialization.propertyList(from: data, options: [], format: &format) on that data to get a top level object, then calls an internal function decode<T>(_ type: T.Type, fromTopLevel container: Any) to perform the actual decoding.

I think it would make sense to make that function public, as sometimes you already have a property list object that you want to decode into the correct swift classes. The only way to do that right now is to wastefully re-serialize it to Data first.

@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
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

1 participant