title: Ajax call with contentType: 'application/json' not working
body: <p>I have an ajax call, that sends form data to a php function. Since I read a lot that using <code>contentType: 'application/json'</code> is best practice I wanted to give it a try as well. But unfortunately my script doesn't return anything when I use it. If I remove it, the script does what it is supposed to do. </p>
  
  <p>Do you have any idea what the reason might be and why? Thank you!</p>
  
  <pre><code>$('#Form').submit(function(e) {
              e.preventDefault();
  
              var content = $(this).serialize() + "&amp;ajax=1";
  
              $.ajax('app/class/controller/contactForm.php', {
                type: "POST",
                //contentType: 'application/json',
                dataType: 'json',
                data: content,
                success: function(result) {
                    console.log(result);
                }
              });
          })
  </code></pre>
  
  <p>and my PHP:</p>
  
  <pre><code>if(isset($_POST['ajax']) &amp;&amp; $_POST['ajax'] === '1') {
      echo json_encode(validateForm($_POST));
  }
  </code></pre>