-2
var parameters = [String:Any]()
parameters = ["user_type_id":"1" ,"user_name":userName.text ,"user_password":password.text,"user_fname":firstName.text,"user_lname":lastName.text,"user_phone":"0000000","city_id":"1", "land_size": "10","location_ID":"2", "image_ID":"1","email":"aaaaa"] as [String : Any]
Alamofire.request(url ,method : HTTPMethod.post , parameters: parameters , encoding: JSONEncoding.default).responseJSON {(response: DataResponse<Any>)in print(response.result.value)
print("success")
我使用alamofire發送登記數據到網絡服務器,它給我的錯誤:無效類型的JSON寫(_SwiftValue)」錯誤:無效類型JSON寫
是四個'.text'值自選項目? – vadian