title: Why am I getting a "String is not NSObject" error in Alamofire?
body: <pre><code>let parameters = [
                  "alert": model.alert, //Bool
                  "distance": model.distance, //Int
                  "minAge": model.minAge, //Int
                  "maxAge": model.maxAge, //Int
                  "access_token": access_token //String
              ]
              Alamofire.request(.POST, Constants.Domain + "/accounts/discovery-settings", parameters: parameters).responseJSON{
                  (req, res, json, error) in
              }
  </code></pre>
  
  <p>I did a very similar request previously and it worked.  According to Alamofire, I can set the parameters to anything, right?</p>
  
  <p>Edit:</p>
  
  <p>If I remove these lines, then it compiles just fine. The Bool and Int types seem to be the problem.</p>
  
  <pre><code>            "alert": model.alert, //Bool
              "distance": model.distance, //Int
              "minAge": model.minAge, //Int
              "maxAge": model.maxAge, //Int
  </code></pre>
  
  <p>The model is:</p>
  
  <pre><code>class DiscoverySettings {
      var alert: Bool
      var distance: Int
      var minAge: Int
      var maxAge: Int
      private init(){
          alert = true
          distance = 10
          minAge = 18
          maxAge = 25
      }
  }
  </code></pre>
  
  <p><a href="https://github.com/Alamofire/Alamofire#post-request-with-url-encoded-parameters" rel="nofollow">https://github.com/Alamofire/Alamofire#post-request-with-url-encoded-parameters</a></p>