Skip to content

Instantly share code, notes, and snippets.

@Pasanpr
Last active April 11, 2018 15:21
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 Pasanpr/2bdbff6a470d5861b9a1f0643da98e24 to your computer and use it in GitHub Desktop.
Save Pasanpr/2bdbff6a470d5861b9a1f0643da98e24 to your computer and use it in GitHub Desktop.
Initial code snippet for An Overview of Codable: A Quick Peek
import Foundation
let json = """
{
"name": "Pasan",
"id": 1,
"role": "Teacher"
}
""".data(using: .utf8)!
struct Employee {
let name: String
let id: Int
let role: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment