title: Ajax posting data Using FormData, serialize or JSON.stringify method
body: <p>I have a question regarding posting data with Ajax using either FormData object, serialize() or JSON.stringify() method. When should I use one over the others? IN other words, what are disadvantages and advantages of each? Thank you for your helps.</p>
  
  <p><strong>Using FormData:</strong></p>
  
  <pre><code>var formData = new FormData($("#myFormId")[0]);
  
          $.ajax({
              type: "POST",
              url: myPostUrl,
              data: formData,
              async: false,
              cache: false,
              processData: false,
              contentType: false,
              success: function (response) {
              ... }
           ..});
  </code></pre>
  
  <p><strong>Using serialize() method:</strong></p>
  
  <pre><code>var data = $("form-input-selectors").serialize();
  
  
      $.ajax({
          type: "POST",
          url: myOtherPostUrl,
          data: data,
          async: false,
          cache: false,
          success: function (response) {
              ......
          }
      });
  </code></pre>
  
  <p><strong>Using JSON.stringify():</strong></p>
  
  <pre><code>$.ajax({
              url: 'myPostUrl',
              type: "POST",
              cache: false,
              datatype: "JSON",
              data: JSON.stringify({
                  "id": id,
                  "name": name,
                  "type": type,
                  "description": description,
                  "email": email
              }),
              success: function(result) {
                  //do stuff
              }
  </code></pre>