JSONDecoder
extension JSONDecoder: AnyDecoder
-
Decode a heterogeneous list of objects.
Declaration
Swift
func decode<T, U>(family _: T.Type, from data: Data) throws -> [U] where T : ClassFamily, U : Decodable
Parameters
family
The ClassFamily enum type to decode with.
data
The data to decode.
Return Value
The list of decoded objects.