Advertisement
Guest User

Untitled

a guest
Oct 4th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. //Simple Gloss Sample code of a user , consise with MoyaExplained.swift
  2.  
  3. import Gloss
  4.  
  5. struct User: Decodable {
  6.  
  7. let email: String?
  8. let password: String?
  9. let name: String?
  10.  
  11. // MARK: - Deserialization
  12.  
  13. init?(json: JSON) {
  14.  
  15. self.name = "name" <~~ json
  16. self.email = "email" <~~ json
  17. self.password = "password" <~~ json
  18.  
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement