Skip to content

Instantly share code, notes, and snippets.

@tifoaudii
Created June 17, 2023 16:20
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 tifoaudii/5b5c3763484e0adc6540e833d6257b47 to your computer and use it in GitHub Desktop.
Save tifoaudii/5b5c3763484e0adc6540e833d6257b47 to your computer and use it in GitHub Desktop.
guard let fileUrl = Bundle.main.url(forResource: "Token", withExtension: "json") else {
return
}
guard let jsonData = try? Data(contentsOf: fileUrl) else {
return
}
guard let object = try? JSONSerialization.jsonObject(with: jsonData, options: .fragmentsAllowed),
let dictionary = object as? [String : Any] else {
return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment