title: jQuery AJAX and JSON format
body: <p>I have a webservice that expects to receive JSON, like so:</p>
  <pre><code>{&quot;first_name&quot;:&quot;test&quot;,&quot;last_name&quot;:&quot;teste&quot;,&quot;email&quot;:&quot;moi@someplace.com&quot;,&quot;mobile&quot;:&quot;+44 22 2222 2222&quot;, &quot;password&quot;:&quot;testing&quot;}
  </code></pre>
  <p>My AJAX call in jQuery:</p>
  <pre><code>$.ajax({
          type: &quot;POST&quot;,
          url: hb_base_url + &quot;consumer&quot;,
          contentType: &quot;application/json&quot;,
          dataType: &quot;json&quot;,
          data: {
              first_name: $(&quot;#namec&quot;).val(),
              last_name: $(&quot;#surnamec&quot;).val(),
              email: $(&quot;#emailc&quot;).val(),
              mobile: $(&quot;#numberc&quot;).val(),
              password: $(&quot;#passwordc&quot;).val()
          },
          success: function(response) {
              console.log(response);
          },
          error: function(response) {
              console.log(response);
          }
      });
  </code></pre>
  <p>Is there any way to check the format in which my data is being sent? I'm supposedly not sending correct JSON to the server (that is the first step in validation).</p>
  <p>Is my jQuery code sending valid JSON or did I miss something?</p>