I'm trying to use this FunctionalJSON-swift to parse JSON to object but I can't figure out how to use method performRequest from NetworkClient and obtain my User object. This is what I have:
let url = NSURL(string: "http://localhost/my_app/user.json")
let request = NSMutableURLRequest(URL: url)
request.HTTPMethod = "GET"
performRequest(request, callback: { (data: Result<User>) -> () in
// how obtain User?
})
This is output from url, I think it's all right at this point:
{"id":1,"name":"User Name","email":"[email protected]"}