Skip to content

Instantly share code, notes, and snippets.

@Askill
Last active April 13, 2022 21:03
Show Gist options
  • Save Askill/7daa2d27773ec06d86216816cdeedbc1 to your computer and use it in GitHub Desktop.
Save Askill/7daa2d27773ec06d86216816cdeedbc1 to your computer and use it in GitHub Desktop.
format large json files
import json
inp = ""
out = ""
with open(inp, "r", encoding="utf-8") as f:
with open(out, "w", encoding="utf-8") as f2:
json.dump(json.load(f), f2, indent=2, ensure_ascii=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment