Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. import Foundation
  2.  
  3. extension Decodable {
  4.  
  5. public static func from(data: Data) throws -> Self {
  6.  
  7. return try JSONDecoder()
  8. .decode(self, from: data)
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement