Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let path : URL = Bundle.main.path(forResource: "scifi-novels", ofType: "json").flatMap {
- URL.init(fileURLWithPath: $0)
- }!
- let data = try! Data(contentsOf: path)
- let json = try! JSONSerialization.jsonObject(with: data) as? [String: Any]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement