Skip to content

Instantly share code, notes, and snippets.

@jasoncodes
Created September 19, 2018 03:43
Show Gist options
  • Save jasoncodes/05cecbf3357c409b94a1115f61638407 to your computer and use it in GitHub Desktop.
Save jasoncodes/05cecbf3357c409b94a1115f61638407 to your computer and use it in GitHub Desktop.
JSON bookmarklet
A basic bookmarklet to make JSON readable.
Minified using http://chriszarate.github.io/bookmarkleter/.
javascript:!function(){document.body.textContent=JSON.stringify(JSON.parse(document.body.textContent),0,2),document.body.style.whiteSpace=%22pre%22,document.body.style.fontFamily=%22monospace%22}();
document.body.textContent = JSON.stringify(JSON.parse(document.body.textContent), 0, 2);
document.body.style.whiteSpace = 'pre';
document.body.style.fontFamily = 'monospace';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment