Last active
December 19, 2019 19:10
-
-
Save Vopaaz/948f2f4d393b3a58699f4ded9c0d00ae to your computer and use it in GitHub Desktop.
Prettified json dump with proper indent and word wrap.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open(file, "w", encoding="utf-8") as f: | |
json.dump(js_obj, f, indent=4, separators=(',', ': ')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment