[swift-corelibs-dev] encodeEncodable/decodeDecodable

Luke Howard lukeh at padl.com
Wed Sep 20 08:30:03 CDT 2017


I’m fairly out of touch with Swift these days, but I took a quick look at importing the encodeEncodable/decodeDecodable changes from stdlib into SwiftFoundation.

I ran into a bunch of bridging issues with the PropertyListDecoder, where it would be balk on the encoded property list types being Foundation instead of Swift types (e.g. “Expected to decode Dictionary<String, Any> but found a dictionary instead”).

Not sure the best way to workaround these: I started doing so explicitly in the unbox methods, but it didn’t feel intuitively right (apart from all the boilerplate code, sometimes the input value would be a Foundation object, other times not). I haven’t had time to investigate further.

Luke Howard
web <http://lukehoward.com/> / facebook <https://www.facebook.com/lukehowardmusic> / soundcloud <https://soundcloud.com/lukehoward/> / spotify <https://open.spotify.com/artist/3duTXsC49HoPt4f4EySDKf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20170920/734e8598/attachment.html>


More information about the swift-corelibs-dev mailing list