Add jsonDump to quickly dump prettier json
This commit is contained in:
10
jsonDump.py
Executable file
10
jsonDump.py
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
|
||||||
|
content = None
|
||||||
|
|
||||||
|
with open(sys.argv[1], 'r') as fh:
|
||||||
|
content = json.load(fh, encoding='utf-8')
|
||||||
|
|
||||||
|
print(json.dumps(content, indent=4, separators=(',', ': '), ensure_ascii=False))
|
||||||
Reference in New Issue
Block a user