[swift-users] Decode a JSON object of unknown format into a Dictionary with Decodable in Swift 4
gparker at apple.com
Thu Jun 22 20:42:21 CDT 2017
> On Jun 22, 2017, at 6:00 PM, Jon Shier via swift-users <swift-users at swift.org> wrote:
> My main concern here is that, as Swift’s official JSON parsing method, Codable should be able to handle any JSON representation and use and it doesn’t.
Is this true? Is Codable intended to be Swift's official JSON parsing system? Is Codable intended to be a general-purpose JSON parsing system?
My understanding was that Codable was designed to serialize Swift types, not to be able to import arbitrary JSON text into Swift nor to interoperate with every existing JSON API.
Greg Parker gparker at apple.com <mailto:gparker at apple.com> Runtime Wrangler
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-users