Required Instance Methodswift 6.0.1Swift

    container(keyedBy:)

    Returns an encoding container appropriate for holding multiple values keyed by the given key type.

    func container<Key>(keyedBy type: Key.Type) -> KeyedEncodingContainer<Key> where Key : CodingKey

    Parameters

    type

    The key type to use for the container.

    Returns

    A new keyed encoding container.

    You must use only one kind of top-level encoding container. This method must not be called after a call to unkeyedContainer() or after encoding a value through a call to singleValueContainer()

    Other requirements

    Instance members