Why NSDictionary will loose the proper formate after adding the data? <p>I am trying to add data in the NSdictionary with the following format</p> <pre><code>{"task_id": "101", "user_id": "111", "parent": "0", "task_name": "buy gift for friends birthday party", "repeat_alarm": "0", "alert_type": "1", "alert_file_name": "mypersonal_reminder_audio", "notification_date": "2017-01-05", "notification_time": "11:15:00", "status": "1", "subtasks":"addTaskArray"} </code></pre> <p>But when i run the application it print in the different format.</p> <pre><code> {"task_id" = "1", "user_id" = "167", "parent" = "0", "task_name" = "buy gift for friends birthday party", "repeat_alarm" = "0", "alert_type" = "1", "alert_file_name" = "mypersonal_reminder_audio", "notification_date" = "2017-01-05", "notification_time" = "11:15:00", "status" = "1", "subtasks" = "addTaskArray"} </code></pre> <p>I need any one help me out how i will remove "=" sign from the NSDictionary,Even though i want to add this NSDictionary in the NSArray with following format.</p> <pre><code> [ {"task_id": "101", "user_id": "111", "parent": "0", "task_name": "buy gift for friends birthday party", "repeat_alarm": "0", "alert_type": "1", "alert_file_name": "mypersonal_reminder_audio", "notification_date": "2017-01-05", "notification_time": "11:15:00", "status": "1", "subtasks":"addTaskArray"} ] </code></pre> <p>I am trying to pass this parameter using "Alamofire" request but it gives me such a internal server error because of my request parameter which is wrong. Any one please help me out how i will create this request ? and i will successfully pass as parameter to "Alamofire".</p> <p><strong>I am trying to use this following code for post the request.</strong></p> <pre><code>var request = URLRequest(url: url) request.httpMethod = "POST" request.setValue("application/json", forHTTPHeaderField: "Content- Type") values = ["task_id": "1", "user_id": "167", "parent": "0", "task_name": "buy gift for friends birthday party", "repeat_alarm": "0", "alert_type": "1", "alert_file_name": "mypersonal_reminder_audio", "notification_date": "2017-01-05", "notification_time": "11:15:00", "status": "1", "subtasks":"addTaskArray"] request.httpBody = try! JSONSerialization.data(withJSONObject: values) Alamofire.request(request).responseJSON { response in switch response.result { case .failure(let error): print(error) if let data = response.data, let responseString = String(data: data, encoding: .utf8) { print(responseString) } case .success(let responseObject): print(responseObject) } } </code></pre> <p>Your help will be appreciate.</p> <p>Thanks. </p>