title: POSTing json to express using jQuery
body: <p>I'm having an issue when sending JSON data from my client to a node server running express.</p>
  
  <p>Here's a simple server that demonstrates my issue:</p>
  
  <pre><code>var express = require('express');
  
  var app = express();
  
  app.configure(function(){   
      app.use(express.bodyParser());
      app.use(app.router);
      app.use(express.logger());
  });
  
  app.listen(80);
  
  app.post('/', function(req,res){
      console.log(req.body);
      console.log(req.body.number + 1);
  });
  </code></pre>
  
  <p>This server simply logs all POST data to the console.</p>
  
  <p>If I then paste the following into chrome's development console:
  <code>$.post('/', {number:1});</code></p>
  
  <p>The server prints out:</p>
  
  <pre><code>{ number: '1' }
  11
  </code></pre>
  
  <p>How can I stop the number I'm passing being interpreted as a string?
  Is it something to do with the bodyParser middleware I'm using? </p>
  
  <p>Any help appreciated!!</p>