Studying "Codable.swift" and "JSONEncoder.swift" to understand how decoding
works under the hood, I got confused about how CodingKey is implemented for
'enum'. Shouldn't have an extension of RawRepresentable to implement the
CodingKey protocol?
This is the answer I'm looking for, how the CodingKey protocol is
implemented on enum?
Happy to answer any questions on this you might have.
— Itai
···
On 4 Oct 2017, at 14:50, Solli Honorio via swift-users wrote:
Studying "Codable.swift" and "JSONEncoder.swift" to understand how decoding
works under the hood, I got confused about how CodingKey is implemented for
'enum'. Shouldn't have an extension of RawRepresentable to implement the
CodingKey protocol?
This is the answer I'm looking for, how the CodingKey protocol is
implemented on enum?
Happy to answer any questions on this you might have.
— Itai
On 4 Oct 2017, at 14:50, Solli Honorio via swift-users wrote:
Studying "Codable.swift" and "JSONEncoder.swift" to understand how decoding
works under the hood, I got confused about how CodingKey is implemented for
'enum'. Shouldn't have an extension of RawRepresentable to implement the
CodingKey protocol?
This is the answer I'm looking for, how the CodingKey protocol is
implemented on enum?