How to convert JSON null values to None in Python

1 Answer

0 votes
import json

json_date = r'{"name": "Am", "city": null, "language": null}'

dict = json.loads(json_date)

print(dict) 
 
 
 
 
 
'''
run:
 
{'name': 'Am', 'city': None, 'language': None}
 
'''

 



answered Jun 17, 2022 by avibootz

Related questions

1 answer 109 views
1 answer 119 views
1 answer 113 views
1 answer 124 views
1 answer 157 views
1 answer 132 views
...