SHARE
TWEET

Untitled

a guest Oct 4th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top