{"1":null, "2":false, "3":true}
I don't need them to be converted to None False True.
According to this page https://www.w3schools.com/python/python_json.asp
The python None Type is converted to null that you're looking for
Python | JSON |
---|---|
dict | Object |
list | Array |
tuple | Array |
str | String |
int | Number |
float | Number |
True | true |
False | false |
None | null |
with open(r"D:\microsoft presentation\json.json", 'w+') as outfile:
json.dump(output, outfile, sort_keys = False, indent = 4, ensure_ascii = False)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.