1. the way you read the json is not right
2. if use str.replace to replace "null"(?!). what you do is to read json, then immediately dump it back as string. So then why read it as json at all? just read the file as text and replace "null" if you are going to do this
3. once you read the json properly as a dict you can loop over it and replace None. However it looks like complex data structure, so I cannot be more specific
with open("con_error.json", "r") as f: data = json.load(f)now you have your json as data dict
2. if use str.replace to replace "null"(?!). what you do is to read json, then immediately dump it back as string. So then why read it as json at all? just read the file as text and replace "null" if you are going to do this
3. once you read the json properly as a dict you can loop over it and replace None. However it looks like complex data structure, so I cannot be more specific
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs