title: base64 JSON encoded strings in nodejs
body: <p>How do I create a base64 JSON encoded strings in nodejs?</p>
  
  <p>I tried this and it didn't work.</p>
  
  <pre><code>var buff = new Buffer({"hello":"world"}).toString("base64");
  </code></pre>
  
  <p>Is this it?</p>
  
  <pre><code>var buff = new Buffer(JSON.stringify({"hello":"world"})).toString("base64");
  </code></pre>