12 lines
372 B
Python
Executable file
12 lines
372 B
Python
Executable file
#!/usr/bin/python3
|
|
|
|
import json
|
|
import argparse
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("input", type=argparse.FileType('r', encoding='utf-8'))
|
|
parser.add_argument('output', type=argparse.FileType('w', encoding='utf-8'))
|
|
args = parser.parse_args()
|
|
|
|
data = json.load(args.input)
|
|
json.dump(data, args.output, ensure_ascii=False, sort_keys=True, indent='\t')
|