let parameters = [ "NationalCode": "06097732", "password": "0012" ] let url = "http://android/home/login" Alamofire.request(url, method: .post, parameters: parameters, encoding: URLEncoding.httpBody).responseJSON { response in if let data = response.data { let json = String(data: data, encoding: String.Encoding.nonLossyASCII) print(json) self.lbl1.text=json } }
"{\"id\":\"3\",\"name\":\"jac\"}"
if let q=json as? Dictionary<String,AnyObject>{ if let PName=q["name"] as? String{ self.lbl1.text=PName } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)