Created
May 25, 2020 11:46
-
-
Save yogendratamang48/0fb5c02910468a7f8b8d16d41501964f to your computer and use it in GitHub Desktop.
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
#! /usr/bin/python3 | |
import json | |
import sys | |
try: | |
jdata = json.loads(open(sys.argv[1], 'r').read()) | |
with open(sys.argv[1], 'w', encoding='utf-8') as fp: | |
fp.write(json.dumps(jdata, ensure_ascii=False, indent=2)) | |
except Exception as e: | |
print("Something went wrong: ", str(e)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment