CHGenerator/Sources/Generator/Extensions/Decodable+Extensions.swift

9 lines
165 B
Swift
Raw Normal View History

2022-08-19 18:05:06 +02:00
import Foundation
extension JSONDecoder {
func decode<T>(from data: Data) throws -> T where T: Decodable {
try self.decode(T.self, from: data)
}
}