I have a corrupted json, like following:
{'a': 'b', 'c': "abcd'efgh ijklm"}
Before using python json.loads, i need to do 2 things:
- replace single quote inside double quote with
\' - replace all other single quote, except
\'with double quote
I am not sure how to do both steps. Please help.
'by\'in double-quoted strings?'"'needs to become"\"", not""".ast.literal_evalto convert the string to dict?