I am on a difficult part of swing and after hours or investigations, I have found informations but not enough to perform what I look for. I'am sending a POST http request to a server, this one send me back a JSON converted as an NSDictionnary:
let json = NSJSONSerialization.JSONObjectWithData(data, options: nil, error: &err) as? NSDictionary
To see what the server send to me, I print this NSString:
let responseString = NSString(data: data, encoding: NSUTF8StringEncoding)
println("**** response data = \(responseString)")
This is an example of what it can return to me:
**** response data = Optional({"result":true,"data":"[{\"id\":\"284ad166f8152268e4010c4cb21c40c13f195165\",\"due\":null,\"description\":\"\",\"status\":\"LATE\",\"summary\":\"tache late\",\"context\":\"\",\"folder\":\"INBOX\"},{\"id\":\"b43bd766295220b23279899d025217d18e98374a\",\"due\":null,\"description\":\"\",\"status\":\"IN-PROCESS\",\"summary\":\"tache in process\",\"context\":\"\",\"folder\":\"INBOX\"}]"}
What I look for, is separate these informations to get the Id on a string, the due on another, description on another, etc. to print them on a UITableView, one line per array.
I have found tons of tutorials, links, like https://github.com/dankogai/swift-json, http://owensd.io/2014/08/06/functional-json.html, https://github.com/thoughtbot/Argo or http://roadfiresoftware.com/2014/08/a-safer-approach-to-json-parsing-in-swift/but...
I'm brand new on swift coding, it's my first month with this language, I'm probably missing somethings very easy about this Json parsing...
Thank you for your help.