title: Swift 3 JSONSerialization serialize dictionary contain \ character
body: <p>I'm making a request to remote server using RESTful API. I create a dictionary then I use JSONSerialization to serialize it to Data. The problem is when serialize date time dd/mm/yyyy it automatically add a \ character. This problem may be due to the convert from Dictionary to Data or Data to String. I don't know exactly. </p>
  
  <p><strong>How to remove this \ character</strong></p>
  
  <p>Below are my code on app:</p>
  
  <pre><code>var dic = [String : String]()
  let dateFormatter = DateFormatter()
  dateFormatter.dateFormat = "dd/MM/yyyy hh:mm:ss"
  let current : String = dateFormatter.string(from: now)       
  dic["RequestAt"] = current
  // others set key-value
  do {
      var request = URLRequest(url: URL(string: DOMAIN_NAME)!)
      request.httpMethod = "POST"
      request.timeoutInterval = 3
      request.addValue("application/json charset=utf-8", forHTTPHeaderField: "Content-Type")
      request.addValue("application/json charset=utf-8", forHTTPHeaderField: "Accept")
      let d = try JSONSerialization.data(withJSONObject: dic, options: [])
      let str = String.init(data: d, encoding: .utf8)
      print(str ?? "NOTHING") // Same result as server's receive
      request.httpBody = d
      let session = URLSession.shared
  
      session.dataTask(with: request) { data, response, err in
          //handle callback
      }.resume()
  
  } catch let error {        
      print(error.localizedDescription)
  }
  </code></pre>
  
  <p>But server-side receive below json:</p>
  
  <pre><code>{
      "RequestAt":"08\/04\/2017 11:42:03",
      ....
  }
  </code></pre>
  
  <p>Thank you for your support.</p>