Skip to content

Instantly share code, notes, and snippets.

@Pasanpr Pasanpr/json.swift Secret
Last active Apr 11, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.