Use and application of the parameters inside json.dump, json.dumps (a, indent = 5, ensure_ascii = False)

json.dumps (a, indent = 5, ensure_ascii = False) 

meaning ensure_ascii represents the ASCII code if you want to turn, if you open (turned on by default True), then into the json Chinese will become ASCII encoding, if you turn off Chinese or Chinese, will not become ASCII encoding.

indent represents the length of the interval as shown below:

Guess you like

Origin www.cnblogs.com/qiaoer1993/p/12111292.html