Python json.dumps() 自动缩进

json.dumps(target_dict, indent=4)

dumps()indent参数默认为None, 修改为一定的数值即可

猜你喜欢

转载自www.cnblogs.com/josephchuh/p/9212778.html