thieumao

Doc file tu Resource

Nov 16th, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.73 KB | None | 0 0
  1.         if let configPath = Bundle.main.path(forResource: "resume", ofType: "json") {
  2.             do {
  3.                 let jsonString = try String(contentsOfFile: configPath, encoding: .utf8)
  4.                 //print("jsonString ", jsonString)
  5.                 //let res = try JSONSerialization.jsonObject(with: jsonString.data(using: .utf8)!, options: .allowFragments) as? Array<Dictionary<String, Any> >
  6.                 //print("res", res)
  7.                 let res1 = JsonParser.parseArray(jsonString)
  8.                 print("res1 ", res1)
  9. //                if let returnCode = res1?["code"] {
  10. //                    print("ma code la \(returnCode)")
  11. //                }
  12.             } catch _ {
  13.                
  14.             }
  15.         }
Advertisement
Add Comment
Please, Sign In to add comment