title: jQuery not sending JSON on AJAX POST request
body: <p>I am a little confused here,I am trying to post data to my node js server using the following code:</p>
  
  <pre><code>$.ajax({type:'POST',
          url:'/map',
          data:'type=line&amp;geometry='+str,
          success:function(msg)
          {
            console.log(msg);
          },
          datatype:'json'     
      });
  </code></pre>
  
  <p>This is the result here:</p>
  
  <pre><code> { type: 'line', geometry: 'b~cqCge{b[mv|q@xnyC' }
  </code></pre>
  
  <p>This is not JSON.I had previously tried to use <code>contentType</code> and do this like this:</p>
  
  <pre><code>$.ajax({type:'POST',
          url:'/map',
          data:{type:'line',geometry:str},
          success:function(msg)
          {
              console.log(msg);
          },
          datatype:'json',
          contentType:"application/json"  
      });
  </code></pre>
  
  <p>Even this sent the data without any change.I have also tried the above method using the data string from the first one.I have also tried setting <code>processData</code> to <code>false</code> along with the methods in the code blocks.</p>
  
  <p>It is important to me that the data be in <code>JSON</code> and use <code>AJAX</code> because I am trying to <a href="https://stackoverflow.com/questions/22230131/inserting-into-mongodb-using-node-js">insert into mongodb from node js using mongojs and it fails</a></p>