A user-defined key for providing context during encoding and decoding.
SDK
- Xcode 9.0+
Framework
- Swift Standard Library
Declaration
struct CodingUserInfoKey
A user-defined key for providing context during encoding and decoding.
SDK
Framework
struct CodingUserInfoKey
typealias Coding User Info Key .Raw ValueThe raw type that can be used to represent all values of the conforming type.
init?(raw Value: String)Creates a new instance with the given raw value.
var hash Value: IntThe key’s hash value.
let raw Value: StringThe key’s string value.
func hash(into: inout Hasher)Hashes the essential components of this value by feeding them into the given hasher.
static func != (Coding User Info Key, Coding User Info Key) -> BoolReturns a Boolean value indicating whether two values are not equal.
static func == (Coding User Info Key, Coding User Info Key) -> BoolReturns a Boolean value indicating whether the given keys are equal.
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 DecodableA type that can decode itself from an external representation.
protocol Coding KeyA type that can be used as a key for encoding and decoding.