Mercurial > public > lazybear
comparison LazyBear/Global functions/ParseJSON.swift @ 349:5ccceb527178
Implementing new internal API
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Wed, 14 Apr 2021 23:08:26 +0200 |
parents | d17dd5c28211 |
children | 5f21f7c23c5e |
comparison
equal
deleted
inserted
replaced
348:0abb8d5c12ec | 349:5ccceb527178 |
---|---|
4 // | 4 // |
5 // Created by Dennis Concepción Martín on 1/4/21. | 5 // Created by Dennis Concepción Martín on 1/4/21. |
6 // | 6 // |
7 | 7 |
8 import Foundation | 8 import Foundation |
9 | |
9 | 10 |
10 func parseJSON<T: Decodable>(_ filename: String) -> T { | 11 func parseJSON<T: Decodable>(_ filename: String) -> T { |
11 let data: Data | 12 let data: Data |
12 | 13 |
13 guard let file = Bundle.main.url(forResource: filename, withExtension: nil) | 14 guard let file = Bundle.main.url(forResource: filename, withExtension: nil) |