title: I need to transport a javascript object via query string
body: <p>I have a javascript object that I need to be able to pass to a web service via query string.</p>
  
  <p>Say for example:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var test = new Object();
  test.date = new Date();
  test.str = "hello world!";
  test.list = new Array();
  test.list.push('a');
  test.list.push('b');
  test.list.push('c');
  &lt;/script&gt;
  </code></pre>
  
  <p>Is there a way that I can serialize that object as JSON and then compress/encode it in some way that can be passed into a url's query string?</p>
  
  <p>like:</p>
  
  <pre><code>var destination = 'http://mywebservice?'+encode(serialize(test));
  $.get(destination, function(e)) { ... }
  </code></pre>
  
  <p>Thanks in advance</p>