import json
a = {}
print(json.dumps(a, indent=1))
#indent=1代表字节点比父节点前多几个空格