MetaUnkeyedEncodingContainer

open class MetaUnkeyedEncodingContainer : UnkeyedEncodingContainer

Manages a EncodingUnkeyedContainerMeta

properties

  • A reference to this containers underlying EncodingUnkeyedContainerMeta

    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

count

  • Declaration

    Swift

    open var count: Int { get }

encode

  • Declaration

    Swift

    open func encodeNil() throws
  • Declaration

    Swift

    public func encode<T>(_ value: T) throws where T : Encodable

nested container

  • Declaration

    Swift

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

    Swift

    public func nestedUnkeyedContainer() -> UnkeyedEncodingContainer

super encoder

  • Declaration

    Swift

    public func superEncoder() -> Encoder

overridable methods

  • create a coding key for the given index

    Declaration

    Swift

    open func createCodingKey(for index: Int) -> CodingKey
  • Create a new reference for the element at the given index.

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

    Declaration

    Swift

    open func createElementReference(for index: Int) -> Reference