MetaKeyedEncodingContainer

open class MetaKeyedEncodingContainer<K> : KeyedEncodingContainerProtocol where K : CodingKey

Manages a EncodingKeyedContainerMeta

  • Key

    Declaration

    Swift

    public typealias Key = K

properties

  • A reference to this containers underlying EncodingKeyedContainerMeta

    Declaration

    Swift

    open var reference: Reference
  • The encoder that created this container.

    Encoding, creating new containers and creating super encoders is delegated to it.

    Declaration

    Swift

    public let encoder: MetaEncoder
  • Declaration

    Swift

    public let codingPath: [CodingKey]

initalization

encode

nested container

  • Declaration

    Swift

    public func nestedContainer<NestedKey>(keyedBy keyType: NestedKey.Type, forKey key: K) -> KeyedEncodingContainer<NestedKey> where NestedKey : CodingKey
  • Declaration

    Swift

    public func nestedUnkeyedContainer(forKey key: K) -> UnkeyedEncodingContainer

super encoder

overridable methods

  • Create a new reference for the element at the given coding key.

    nestedContainer, nestedUnkeyedContainer and superEncoder use this method to create element references.

    Declaration

    Swift

    open func createElementReference(for key: CodingKey) -> Reference