Type Alias

Codable

A type that can convert itself into and out of an external representation.

Declaration

typealias Codable = Decodable & Encodable

See Also

Custom Encoding and Decoding

Encoding and Decoding Custom Types

Make your data types encodable and decodable for compatibility with external representations such as JSON.

protocol Encodable

A type that can encode itself to an external representation.

Beta
protocol Decodable

A type that can decode itself from an external representation.

Beta
protocol CodingKey

A type that can be used as a key for encoding and decoding.

Beta
struct CodingUserInfoKey

A user-defined key for providing context during encoding and decoding.

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software