当api有字典时传递Url中的值

时间:2014-05-22 13:43:58

标签: ios objective-c json

这是我的Api,我需要传递Passport号码Expiry数据的值以及我知道的其他字段,当它只是正常值时传递数据。我不确定如何在Dictionary Passport字段中传递数据

{
"CustomerID":0,
"UploadType":"String",
"Passport":
  {
  "PassportNumber":"String",
  "ExpiryDate":"\/Date(-62135596800000-0000)\/",
  "CountryOfIssue":"String",
  "FileName":"String",
  "FileDescription":"String",
  "FileExtension":"String",
  "MimeType":"String",
  "FileData":"AA=="
  },
 "RequestID":"String"
}

我尝试了这个,但它没有成功

NSString *urlString =[NSString stringWithFormat:@"UploadPassport/?CustomerID=%@&UploadType=%@&Passport=&PassportNumber=%@&ExpiryDate=%@&CountryOfIssue=%@&FileName=%@&FileDescription=%@&FileExtension=%@&MimeType=%@&FileData=%@",customerID,uploadType,passportNumber,expiryDate,CountryIssue,fileName,fileDesc,fileExtn,mimeType,fileData];

0 个答案:

没有答案