title: Response of JSONSerialization.jsonObject is nil with the method POST in swift 3
body: <p>this is an example for something i want to do but  the line <code>if let json = try JSONSerialization.jsonObject(with: data) as? [String: String]</code> is <code>false</code> because the return of <code>JSONSerialization.jsonObject</code> is <code>nil</code></p>
  
  <pre><code>func parser(lbl: UILabel){
      let postString = "xxx=xxx&amp;xxxx=xxxx==&amp;xxxxx=xxxxx&amp;xxxxxx=xxxxxx&amp;xx=xx"
  
      let url = URL(string: "http://xxxxxxxxxx.com/xxxxxx/xxxxx/xxxxxx.php")!
      var request = URLRequest(url: url)
  
      request.httpMethod = "POST"
      request.httpBody = postString.data(using: .utf8)
  
      let task = URLSession.shared.dataTask(with: request) { data, response, error in
          guard let data = data else {
              lbl.text = "error";
  
              return
          }
  
          do {
              if let json = try JSONSerialization.jsonObject(with: data) as? [String: String] {
                  DispatchQueue.main.async {
  
                      let error = Int(json["success"]!)
  
                      let message = json["message"]
                      lbl.text = message
                  }
              } 
          } catch let parseError {
              print("error to parse: \(parseError)")
  
              let responseString = String(data: data, encoding: .utf8)
              print("response`enter code here` : \(responseString!)")
          }
      }
      task.resume()
  }
  </code></pre>