I have following string coming from 3rd party api.
teststring = '{"@speccialcharacterssample": "/special.character.test.Sample","content": {"description": "Some number **451000**, Some Time **Monday, April 8th, UTC 11:00**. n# BackSpacenBreaklinenMore Special Character[Full Change Log](https://example.com/v1.0.1).n# Special Character Testncomma test, colon test: breaklinenBreakline followed by hashes testn## Breaklinennew test **451000**, time **Monday, April 8th, UTC 11:00**. Square Brackets [HERE](https://example.com/451000).nThats all.","plan": {"info": "{"bin":{"example/zya32":"https://example.com/v1.0.1/version-v1.0.1-example-xya32?check=asda43tsd23423scasq"}}"}}}'
When i try to convert it to json using code
teststring_json = json.loads(teststring)
It throws following error
teststring_json = json.loads(teststring)
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 1408 (char 1407)
I tried several ways to remove special characters but it never works. e.g
updated_json = teststring.replace('\"', '\\"')