a guest May 27th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. func decodeData(pathName: URL){
  2.         do{
  3.             let jsonData = try Data(contentsOf: pathName)
  4.             let decoder = JSONDecoder()
  5.             athleteList = try decoder.decode([Person].self, from: jsonData)
  6.         } catch {}
  7.     }
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