StringKey
public struct StringKey : CodingKey
CodingKey for String Values
-
The string to use in a named collection (e.g. a string-keyed dictionary).
Declaration
Swift
public var stringValue: String
-
The value to use in an integer-indexed collection (e.g. an int-keyed dictionary).
Declaration
Swift
public var intValue: Int? { get }
-
Creates a new instance from the given string.
If the string passed as
stringValue
does not correspond to any instance of this type, the result isnil
.Declaration
Swift
public init?(stringValue: String)
Parameters
stringValue
The string value of the desired key.
-
Creates a new instance from the specified integer.
If the value passed as
intValue
does not correspond to any instance of this type, the result isnil
.Declaration
Swift
public init?(intValue: Int)
Parameters
intValue
The integer value of the desired key.