title: Key value pair params handling in Backbone.js Router
body: <p>I want to pass key value pairs as params to Backbone routes and want it to be deserialized to a javascript object before the mapped function is called. </p>
  
  <pre><code>var MyRouter = Backbone.Router.extend({
    routes: {
      "dashboard?:params" : "show_dashboard"
    },
    show_dashboard: function(params){
       console.log(params); 
    }
  }); 
  </code></pre>
  
  <p>When I go to "http://...#dashboard?key1=val1&amp;key2=val2", then {key1: "val1", key2: "val2"} should be printed on the console.</p>
  
  <p>Am currently using jQuery BBQ's $.deparam method inside each mapped function to get at the deserialized object. It would be nice if I can extend Router and define it just once so params is accessible inside all mapped functions as an object. What would be a clean way to do this? And are there some pitfalls in this??</p>
  
  <p>Much thanks,</p>
  
  <p>mano </p>