KeyedDecodingContainer
extension KeyedDecodingContainer
-
Attempt to extract a value from a container. If it fails, just return a wrapped default value of the right type.
Declaration
Swift
func decode<T>(_ type: DecodableDefault.Wrapper<T>.Type, forKey key: Key) throws -> DecodableDefault.Wrapper<T>Parameters
typethe type to decode
keythe key to use in the container
View on GitHub
KeyedDecodingContainer Extension Reference