I have a PHP page that has several JSON:
echo json_encode("Hello");
How can I access this in my quick application? I used the method to get the data from the website before, when I printlnreturned the data, it just prints all the HTML for the website (including tags).
let url = NSURL(string: myLinkUrl)
let request = NSURLRequest(URL: url!)
NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue()) {(response, data, error) in
println(NSString(data: data, encoding: NSASCIIStringEncoding))
}
I would like to know how to print only data that displays an echo (in this case, "Hello")
source
share