mardi 5 mai 2015

Can't parsing JSON with SwiftyJson

Everytime I get a breakpoint! What is the problem with my code? I've tried it so many times, but it never worked!

    override func viewDidLoad() {
    super.viewDidLoad()

    let url = NSURL(string: "http://ift.tt/1Pneocm")
    let request = NSData(contentsOfURL: url!)


    let json = JSON(data: request!)
    if let firstname = json["first_name"].string{

    println(firstname)
    //nameLabel.text = firstname
    }

Aucun commentaire:

Enregistrer un commentaire