9 lines
165 B
Swift
9 lines
165 B
Swift
|
import Foundation
|
||
|
|
||
|
extension JSONDecoder {
|
||
|
|
||
|
func decode<T>(from data: Data) throws -> T where T: Decodable {
|
||
|
try self.decode(T.self, from: data)
|
||
|
}
|
||
|
}
|