Skip to content

Instantly share code, notes, and snippets.

@rafaelmaeuer
Last active October 9, 2017 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaelmaeuer/16badcf165dbe0934556a63f21286d2b to your computer and use it in GitHub Desktop.
Save rafaelmaeuer/16badcf165dbe0934556a63f21286d2b to your computer and use it in GitHub Desktop.
function jsonToURI(json){ return encodeURIComponent(JSON.stringify(json)); }
function uriToJSON(urijson){ return JSON.parse(decodeURIComponent(urijson)); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment