I had a lot of trouble decoding a json object that had all kind of special characters, nextline characters (\n), carriage returns (\r). On doing some initial search, I saw solutions where people recommended replacing \n with \\n, etc. I started with that and it worked, but down the path I found that there were many more characters that I had to now replace manually. Then one of my colleague recommended to use a specific JSON decoder with strict=False option. I tried that and it did what I was looking for. Wondering why this method is not recommended on the other blogs, stackoverflow over json.loads.
import json dictData = json.JSONDecoder(strict=False).decode(jsonData)