Advertisement
Guest User

Untitled

a guest
Jul 31st, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.83 KB | None | 0 0
  1.         if let password = json.dictionary?["password"]?.string,
  2.             id = json.dictionary?["id"]?.string,
  3.             rewards = json.dictionary?["rewards"]?.string,
  4.             email = json.dictionary?["email"]?.string,
  5.             referral = json.dictionary?["referral"]?.string,
  6.             name = json.dictionary?["name"]?.string {
  7.                
  8.                 let user = User()
  9.                 user.password = password
  10.                 user.id = id
  11.                 user.surname = json.dictionary?["surname"]?.string ?? ""
  12.                 user.rewards = rewards
  13.                 user.email = email
  14.                 user.referral = referral
  15.                 user.name = name
  16.                 user.fullName = json.dictionary?["fullName"]?.string ?? ""
  17.                
  18.                 return user
  19.                
  20.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement