Valid JSON giving JSONDecodeError: Expecting , delimiter
Solution 1:
You'll need a r
before """, or replace all \
with \\
. This is not something you should care about when read the json from somewhere else, but something in the string itself.
data = json.loads(r"""{ "entry":{ "etag":"W/\"A0UGRK47eCp7I9B9WiRrYU0.\"" } }""")
see here for more information
Solution 2:
You need to add r
before your json string.
>>> st = r'{ "entry":{ "etag":"W/\"A0UGRK47eCp7I9B9WiRrYU0.\"" } }'
>>> data = json.loads(st)
>>>