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 isn’t convertible to Int, the coding key will be initalizes with the while string literal as stringValue and without an intValue.

CodingKey

string literal expressible

Equatable

  • Declaration

    Swift

    public static func == (lhs: StandardCodingKey, rhs: StandardCodingKey) -> Bool