AnyDecoder
public protocol AnyDecoder
Protocol acting as a common API for all types of decoders,
such as JSONDecoder
and PropertyListDecoder
.
-
Decode a value of a given type from binary data.
Declaration
Swift
func decode<T>(_ type: T.Type, from data: Data) throws -> T where T : Decodable