StandardCodingKey
public struct StandardCodingKey : CodingKey, ExpressibleByStringLiteral, Equatable
A CodingKey type initalizable with any string or int value.
This coding key type is exapressible by a string literal in the form <stringValue>,<intValue>
where <stringValue>
it the keys string value and <intValue>
is the keys int value.
You may ommit ,<intValue>
, in which case the coding key will have no int value.
You may also ommit <stringValue>
in which case coding keys stringValue will be “(intValue)”.
Therefor valid string literals for a coding key are:
<stringValue>,<intValue>
<stringValue>
,<intValue>
If the string literal includes more than one,
sequence, only the string after the last occurence will be interpreted as int value.
If
-
Declaration
Swift
public var stringValue: String
-
Declaration
Swift
public var intValue: Int?
-
Declaration
Swift
public init(stringValue: String, intValue: Int)
-
Declaration
Swift
public init?(stringValue: String)
-
Sets stringValue to “(intValue)”
Declaration
Swift
public init?(intValue: Int)
-
Declaration
Swift
public typealias StringLiteralType = String
-
Declaration
Swift
public init(stringLiteral string: String)
-
Declaration
Swift
public static func == (lhs: StandardCodingKey, rhs: StandardCodingKey) -> Bool