Created
February 28, 2019 09:27
-
-
Save alvaroroyo/589881fd2f30afa03acd072ccbd12c93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let url = Bundle.main.url(forResource: "persons", withExtension: "json") | |
let fileData = try! Data(contentsOf: url!) | |
let persons:[Person] = try! JSONDecoder().decode([Person].self, from: fileData) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment