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 120 views
1 answer 126 views
1 answer 123 views
1 answer 133 views
1 answer 167 views
1 answer 144 views
...