Created
January 11, 2020 11:54
-
-
Save weakish/998c568dab7acbaa3e6cdb10a4d133ca to your computer and use it in GitHub Desktop.
Fast dump to pretty formatted JSON file.
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
def dump_to_pretty_json_file(thing: Any, file: TextIO) -> None: | |
"""Fast dump to pretty formatted JSON file.""" | |
json.dump(thing, file, | |
check_circular=False, allow_nan=False, | |
indent=2, separators=(',', ': ')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment