KeyedDecodingContainer
-
Decodes a value of the given type for the given key.
Throws
DecodingError.typeMismatch
if the encountered encoded value is not convertible to the requested type.Throws
DecodingError.keyNotFound
ifself
does not have an entry for the given key.Throws
DecodingError.valueNotFound
ifself
has a null entry for the given key. -
Decodes a value of the given type for the given key, if present.
This method returns
nil
if the container does not have a value associated withkey
, or if the value is null. The difference between these states can be distinguished with acontains(_:)
call.Throws
DecodingError.typeMismatch
if the encountered encoded value is not convertible to the requested type.