Skip to content

Instantly share code, notes, and snippets.

@arpo
Created October 9, 2017 11:49
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 arpo/6960347b9ad7b70d1feb2ae67702bce3 to your computer and use it in GitHub Desktop.
Save arpo/6960347b9ad7b70d1feb2ae67702bce3 to your computer and use it in GitHub Desktop.
Pretty-print JSON using JavaScript
JSON.stringify(jsObj, null, "\t"); // stringify with tabs inserted at each level
JSON.stringify(jsObj, null, 4); // stringify with 4 spaces at each level
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment