Contents

decode(_:forKey:)

Decodes a value of the given type for the given key.

Declaration

func decode(_ type: Float.Type, forKey key: KeyedDecodingContainer<K>.Key) throws -> Float

Parameters

  • type:

    The type of value to decode.

  • key:

    The key that the decoded value is associated with.

Return Value

A value of the requested type, if present for the given key and convertible to the requested type.

Discussion