Structure

CodingUserInfoKey

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

Declaration

struct CodingUserInfoKey

Topics

Type Aliases

typealias CodingUserInfoKey.RawValue

The raw type that can be used to represent all values of the conforming type.

Initializers

init?(rawValue: String)

Creates a new instance with the given raw value.

Instance Properties

var hashValue: Int

The key’s hash value.

let rawValue: String

The key’s string value.

Instance Methods

func hash(into: inout Hasher)

Hashes the essential components of this value by feeding them into the given hasher.

Operator Functions

static func != (CodingUserInfoKey, CodingUserInfoKey) -> Bool

Returns a Boolean value indicating whether two values are not equal.

static func == (CodingUserInfoKey, CodingUserInfoKey) -> Bool

Returns a Boolean value indicating whether the given keys are equal.

Relationships

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.

typealias Codable

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

protocol Encodable

A type that can encode itself to an external representation.

protocol Decodable

A type that can decode itself from an external representation.

protocol CodingKey

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