Creates a new dictionary by decoding from the given decoder.
SDK
- Xcode 9.0+
Framework
- Swift Standard Library
Declaration
init(from decoder: Decoder) throws
Available when Key conforms to Decodable and Value conforms to Decodable.
Parameters
decoderThe decoder to read data from.
Discussion
This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.