Is there JSON encode/decode base64 encode/decode function in JavaScript?
For non-Mozilla browsers, use: http://www.webtoolkit.info/javascript-base64.html
For Mozilla browsers, use btoa() and atob().
btoa()
atob()