title: What works for POST doesn't work for AJAX. But why?
body: <p>This code works perfectly, posts the JSON correctly onto the other side</p>
  
  <pre><code>$.post("/admin/httpaction/verifyCertificate",
                      {_token: '{{csrf_token()}}', certificationNumber: certificateID},
                      function(data){
                          console.debug(data);
                         alert("posted!");
                      }, "json");
  </code></pre>
  
  <p>This code doesn't encode the JSON correctly, resulting in internal server error. It must be something I'm doing wrong with the JSON encoding. But what?</p>
  
  <pre><code> var verifyObj = {
                  _token: "{{csrf_token()}}",
                  certificationNumber: certificateID
              }
  
      $.ajax({
                url: '/admin/httpaction/verifyCertificate',
                dataType: 'json',
                type: 'post',
                contentType: 'application/json',
                data: verifyObj,
                processData: false,
                success: function( data, textStatus, jQxhr ){
                   alert("success");
                },
                error: function( jqXhr, textStatus, errorThrown ){
                    alert("error " + textStatus + " " + errorThrown );
                 }
              });
  </code></pre>