title: Sails.js, get request params a json object
body: <p>I am using sockets in Sails.js</p>
  
  <p>Following is a sample client code:</p>
  
  <pre><code>socket.get('/message/send', {from: userId, to: recepientId, content: textMessage});
  </code></pre>
  
  <p>And this is how I get data in the controller(Server):</p>
  
  <pre><code>    var to = req.param('to');
      var from = req.param('from');
      var content = req.param('message');
  </code></pre>
  
  <p>Now since I am sending the data as a json, i want to get it as a json object. So Message is eventually a model, and I want to store the data in the db directly using the json object.</p>
  
  <p>Similar thing works for me when I use <code>socket.emit('channel',{userId: "someId"})</code>
  So I do receive a JSON object in <code>socket.on('channel', function(userJsonObject){});</code></p>
  
  <p>So how do I get a similar JSON object when I use <code>socket.get()</code></p>