0
私はスウィフト3を使用してJSONをシリアライズしようとしている、と短い来るよ.. これは、JSON(要約)です:迅速な3 JSONシリアライズ
私は「wantThisOne」から日付を望ん{
"values": [
{
"a": {
"b": "1",
"c": {
"d": 0.0
}
},
"wantThisOne": "2016-10-07T08:47:00Z"
},
{
"a": {
"b": "1",
"c": {
"d": 0.0
}
},
"notThisOne": "2016-10-07T09:05:00Z"
}
]
}
しかし、どのように正確にそれを取得するかわからない... これは私が得る限りですが、私はブロックが私のために働くように見えるものは何も試してみません...誰もこれのようなものを扱った?私はスタックのオーバーフローなどを見てきました...しかし、スーパースタック。スウィフトのすべてのの
NSURLConnection.sendAsynchronousRequest(request1 as URLRequest, queue: queue, completionHandler:{ (response: URLResponse?, data: Data?, error: Error?) -> Void in
do {
if let jsonResult = try JSONSerialization.jsonObject(with: data!, options: JSONSerialization.ReadingOptions.mutableContainers) as? NSDictionary {
print(jsonResult)
}
} catch let error as NSError {
print(error.localizedDescription)
}
})
@ Richie Welcome mate :) –