Created
October 8, 2020 09:07
-
-
Save UZziell/f88ef20480eb17f3be55cf86ff0c560e to your computer and use it in GitHub Desktop.
Read compressed json file and write indented json to another file.
This file contains 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
import json | |
import time | |
FILE_NAME = "Preferences" | |
with open(FILE_NAME, "r") as rfp: | |
data = json.load(rfp) | |
with open(FILE_NAME+"-indented.json", "w") as wfp: | |
wfp.write(json.dumps(data, indent=4, sort_keys=True)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment