!/usr/bin/env python
-- coding: utf-8 --
import json
import string
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
def readfile(f):
with open(f, 'r') as f:
return f.readlines()
f = f.replace('
', '
')
def main():
f = sys.argv[1]
debugfile = readfile(f)
for i in debugfile:
print json.dumps(eval(i),sort_keys=True, indent=2, ensure_ascii=False, encoding='utf8')
if name == 'main':
main()