0
我將Json數據發送到服務器時出現錯誤。我使用下面的代碼將NSMutableDictionary更改爲JSON。如何在post-request Objective-C中發送JSON數據?
NSString* jsonString1 = [postDict JSONRepresentation];
NSLog(@"%@",jsonString1);
JSON格式:
{"user_email":"[email protected]","firstname":"nivrit","user_password":"1234","confirm_passward":"1234"}
我用下面的方法來此JSON格式發送到服務器:
NSMutableDictionary *responseDict =
(NSMutableDictionary *)[[mWebServiceHelperOBJ
makeCallToURL:@"register.php"
withDataPost:jsonString1] JSONValue];
當我實現了這個代碼,我收到這個問題
incompatible pointer type sending NSString to parameter of type NSMutableDictionary.
這將是很好知道你爲什麼「不被接受」我寫回信呃... –