title: responseSerializationFailed with Alamofire
body: <pre><code>import UIKit
  import Alamofire
  import SwiftyJSON
  
  class LoginViewController: UIViewController {
  
  
      @IBOutlet weak var urlTextFiled: UITextField!
      @IBOutlet weak var emailTextFiled: UITextField!
      @IBOutlet weak var passwordTextFiled: UITextField!
  
      override func viewDidLoad() {
          super.viewDidLoad()
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
  
      }
  
          guard let email = emailTextFiled.text, !email.isEmpty else {
              return
          }
          guard let password = passwordTextFiled.text, !password.isEmpty else {
              return
          }
          let db = "mohanad"
          let url = "http://176.58.117.249/web/session/authenticate"
  
          let parameters: [String: Any] = [
          "db": db,
          "login": email,
          "password": password ,
          ]
  
          Alamofire.request(url, method: .post, parameters: parameters, encoding: URLEncoding.default, headers: nil)
          .validate(statusCode: 200..&lt;600)
          .responseJSON { response in
  
              switch response.result
              {
              case .failure(let error):
                  print(error)
  
              case .success(let value):
  
                  print(value)
              }
  
          }
  
  
      }
  
  }
  </code></pre>
  
  <p>prints the following error:</p>
  
  <blockquote>
    <p>responseSerializationFailed(Alamofire.AFError.ResponseSerializationFailureReason.jsonSerializationFailed(Error Domain=NSCocoaErrorDomain Code=3840 "Invalid value around character 0." UserInfo={NSDebugDescription=Invalid value around character 0.}))</p>
  </blockquote>