Generic Instance Method

nestedContainer(keyedBy:)

Encodes a nested container keyed by the given type and returns it.

Required.

Declaration

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

Parameters

keyType

The key type to use for the container.

Return Value

A new keyed encoding container.