I am trying to parse JSON data from a website (http://dropdelivery.vacau.com/). I am using alamofire to try and access the data
let url = "http://dropdelivery.vacau.com/"
Alamofire.request(.GET, url).responseJSON {
response in
if response.result.isSuccess {
let jsonDic = response.result.value as! NSDictionary
let responseData = jsonDic["responseData"] as! NSDictionary
print(responseData)
when I run this it returns nothing what am I doing wrong? Is there better way to approach the problem.
jsonbuthtmlpage as stated in the answer below from Andy. You need another serviceurlthat have only json in response or you need takejsonfrom ithtmlpage that is between the tags<body> ... </ body>beforlet jsonDic = response.result.value as! NSDictionaryand in this case it will be noresponseJSONtype of request. For further work with the json have a great library: github.com/SwiftyJSON/SwiftyJSON