Skip to content

Instantly share code, notes, and snippets.

@shiningabdul
Created November 17, 2017 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shiningabdul/8d6cd27786e0f566ce1fe083a7a16dd5 to your computer and use it in GitHub Desktop.
Save shiningabdul/8d6cd27786e0f566ce1fe083a7a16dd5 to your computer and use it in GitHub Desktop.
class User : Transmittable {
var id:String?
}
// Turning a user into JSON data
let user = User()
user.id = "123"
let data = user.encode()
// Turning JSON data back into a user
let serverResponse = User.decode(from: data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment