Swift and SwiftyJSON - dump() not work -


try use dump method on variable filled json. doesnt work , dont understand why

import uikit  class viewcontroller: uiviewcontroller {  var hoge: json?  override func viewdidload() {     super.viewdidload()      let url = nsurl(string: "https://api.whitehouse.gov/v1/petitions.json")     var request = nsurlrequest(url: url!)     var data = nsurlconnection.sendsynchronousrequest(request, returningresponse: nil, error: nil)     if data != nil {         hoge = json(data: data!)         let count = hoge!["results"][0]["body"].stringvalue     println(count)     } }  func res() {     dump(self.hoge) } } 

can please me show doing wrong ?


Comments