这里dashBoardApplyListCriteria参数是一个字典。如何在swift ios中将字典作为参数传递。
这是我的代码
let parameters: NSDictionary = [ "sessionId":sessionId, "jobId":jobId, "dashBoardApplyListCriteria":["1":["Recruiter"], "selectedBucketStatus":"Applies", "allJobsOrMyJobs":"AllJobs", "jobStatus":[0,1,2], "paginationStartNo":0, "paginationHowMuch":5], ] ]
let parameters: [String: Any] =
[
"sessionId":sessionId,
"jobId":jobId,
"dashBoardApplyListCriteria":["actorList":["Recruiter"],
"selectedBucketStatus":"Applies",
"allJobsOrMyJobs":"AllJobs",
"jobStatus":[0,1,2],
"paginationStartNo":0,
"paginationHowMuch":5],
"applyListFilterCriteria":["appliesToBeSorted":["name":"dateApply","isAscending":true]]
]
让jsonData =试试? JSONSerialization.data(withJSONObject:parameters)