当我将nsdictionary设置为请求参数时,带有特殊字符的字典值会添加双引号,这会导致post请求失败,但是当我使用" Rest客户端(Chrome Add-)时使用相同的字典值ONS)"请求发布成功。如何解决问题?
例如lat和long应该是浮点值,因为特殊字符双引号会自动添加。这是我的NSDictionary log->
**
AptSuiteNo = 20;
BuildingName = "the ";
BuiltInYear = 2014;
BuiltUpAreaSize = 200;
CityName = Dhaka;
CountryName = Bangladesh;
CreateDate = "19-04-2016";
CreatedByCompanyID = 7746;
CreatedByUserID = 7915;
CurrencyID = 1;
Description = "The ";
LastUpdateDate = "19-04-2016";
LastUpdatedByUserID = 7915;
Latitude = "23.832637";
LocalityName = Cantonment;
Longitude = "90.416590";
NeighborhoodName = "Nikunja 2";
PlaceID = ChIJieh0al7GVTcRvMjqALwGYVc;
PostedBy = owner;
Price = 200;
PropertyBathroomNumber = 1;
PropertyBedroomNumber = 1;
PropertyBuildUpAreaSizeTypeID = 1;
PropertyID = 0;
PropertyLotSize = 250;
PropertyLotSizeTypeID = 1;
PropertyName = "the ";
PropertyTransactionTypeCategoryID = 1;
PropertyTransactionTypeID = 1;
PropertyTypeID = 10;
StateName = "Dhaka Division";
StateTicker = "Dhaka Division";
ZipCode = 1229;
**
NSMutableURLRequest *request = [[AFJSONRequestSerializer serializer] requestWithMethod:@"POST" URLString:RequestURL parameters:[self requestDataString] error:&error];