I have some JSON I need to parse. Some of the strings in the JSON may contain double quotes. This results in an “Expecting ‘,’ delimiter” error. Here is a short self contained example that demonstrates what I mean:
import json
s = "{"foo":["hello ⅛" goodbye"]}"
json.loads(s)
The problem here is the escaped double quote after the fraction. Is there something I could do globally to a chunk of json to clean up all such instances if present? The quotes around the strings in the JSON complicate this because I actually want those.