[swift-users] Where CodingKey protocol is implemented on swift source code
iferber at apple.com
Wed Oct 4 17:21:41 CDT 2017
`CodingKey` conformance for `enum`s is synthesized by the compiler given
certain rules — you can see mention of this in the [Codable
[search for `public protocol CodingKey`].
If you’re interested in specific implementation for how the compiler
does this, you can refer to
Happy to answer any questions on this you might have.
On 4 Oct 2017, at 14:50, Solli Honorio via swift-users wrote:
> Studying "Codable.swift" and "JSONEncoder.swift" to understand how
> works under the hood, I got confused about how CodingKey is
> implemented for
> 'enum'. Shouldn't have an extension of RawRepresentable to implement
> CodingKey protocol?
> This is the answer I'm looking for, how the CodingKey protocol is
> implemented on enum?
> I appreciate any help, tks
> Solli Honorio
> "o animal satisfeito dorme". - Guimarães Rosa
> swift-users mailing list
> swift-users at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-users