title: In iOS swift Json Parsing How to Pass Parameters in post method
body: <p>Here I have Tried to Sign Up the App Using Mobile Number but I cant do in correct format,I have error in Json parsing for signup the app.</p>
  
  <p>Here I give the code what i am tried,</p>
  
  <pre><code>var request = NSMutableURLRequest(URL: NSURL(string: "http://app.mycompany.in/gcm/test_slim.php/register")!, cachePolicy: NSURLRequestCachePolicy.ReloadIgnoringLocalCacheData, timeoutInterval: 5)
  
  var response: NSURLResponse?
  var error: NSError?
  var reponseError: NSError?
  
  var urlData: NSData? = NSURLConnection.sendSynchronousRequest(request, returningResponse:&amp;response, error:&amp;reponseError)
  
  // create some JSON data and configure the request
  
  let jsonString = "json=[{\"gsm_number\":\(Mobile),\"name\":\(Name),\"email\":\(Email),\"status\":\(Status),\"ver_code\":,\"profile_picture\":,\"device_id\":,\"gcm\":,\"is_register\":,\"thumb_image\":,\"user_baground_img\":}]"
  
  request.HTTPBody = jsonString.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: true)
  request.HTTPMethod = "POST"
  request.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
  
  // send the request
  NSURLConnection.sendSynchronousRequest(request, returningResponse: &amp;response, error: &amp;error)
  
  // look at the response
  if let httpResponse = response as? NSHTTPURLResponse {
      println("HTTP response: \(httpResponse.statusCode)")
      println("jsonString: \(jsonString)")
      var responseData:NSString  = NSString(data:urlData!, encoding:NSUTF8StringEncoding)!
  
      let VerificationcodeViewController = self.storyboard?.instantiateViewControllerWithIdentifier("verificationcodeViewController") as UIViewController
  
      self.navigationController?.pushViewController(VerificationcodeViewController, animated: true)
  } else {
      println("No HTTP response")
      var alertView:UIAlertView = UIAlertView()
      alertView.title = "Error!"
      alertView.message = "Error. &amp; Some Problem was Found"
      alertView.delegate = self
      alertView.addButtonWithTitle("OK")
      alertView.show()
  }
  </code></pre>