Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Foundation
- extension Decodable {
- public static func from(data: Data) throws -> Self {
- return try JSONDecoder()
- .decode(self, from: data)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement