A type that can decode itself from an external representation.
SDK
- Xcode 9.0+
Framework
- Swift Standard Library
Declaration
protocol Decodable
A type that can decode itself from an external representation.
SDK
Framework
protocol Decodable
init(from: Decoder)Creates a new instance by decoding from the given decoder.
Required. Default implementation provided.
Make your data types encodable and decodable for compatibility with external representations such as JSON.
typealias CodableA type that can convert itself into and out of an external representation.
protocol EncodableA type that can encode itself to an external representation.
protocol CodingKey A type that can be used as a key for encoding and decoding.
struct CodingUserInfoKey A user-defined key for providing context during encoding and decoding.