KeyPart

public enum KeyPart : MapKey

A key that represents a value or object in a dictionary. A KeyPart also conforms to a MapKey so that they can be individually used in an Map.

  • Represents an object, dictionary or primitive value in a dictionary.

    Declaration

    Swift

    case object(key: String)
  • Represents the first object in a JSON dictionary.

    Declaration

    Swift

    case array(key: String)
  • key

    Returns the JSON key representing the object, primitive or array. Strips out extra information such as any array indexes.

    Declaration

    Swift

    public var key: String { get }
  • Returns a raw (human readable) representation of this key as it would be before it was parsed.

    Declaration

    Swift

    public var rawValue: String { get }
  • Returns a raw (human readable) representation of this key as it would be before it was parsed.

    Declaration

    Swift

    public func parseKeyParts() throws -> [KeyPart]