I am extracting a postgres table as json. The output file contains lines like:
{\"data\": {\"test\": 1, \"hello\": \"I have \\\" !\"}, \"id\": 4}
Try the ways source.replace('""', '') or sub it, cause "" in the source will make json.loads(source) can not distinguish them.
source.replace('""', '')
""
json.loads(source)