decode(_:from:format:)
Returns a value of the specified type by decoding a property list using the supplied format.
Declaration
func decode<T>(_ type: T.Type, from data: Data, format: inout PropertyListDecoder.PropertyListFormat) throws -> T where T : DecodableDiscussion
If the data is not a valid property list, this method throws the DecodingError.dataCorrupted(_:) error. If a value within the property list fails to decode, this method throws the corresponding error.