Jun-10-2018, 07:26 PM
null
value is not enclosed in double quotes - but string values are. You have essentially corrupted your JSON file by inserting unquoted string.Your replace line should have been
json_string=json.dumps(data).replace("null", '"vacio"')
Test everything in a Python shell (iPython, Azure Notebook, etc.)
- Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
- Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
- You posted a claim that something you did not test works? Be prepared to eat your hat.