I am trying to decode a JSON string using
json.loads(request.POST.get('d'))
where d is a POST parameter containing a JSON string.
I get the following error in the stacktrace:
ValueError: Unterminated string starting at: line 1 column 22 (char 22)
This is the JSON string:
{"data":{"40":{"html":"<span style=\"color:#ffffff;\">test</span>","background":"transparent"},"41":{"html":"","background":"transparent"},"42":{"html":"","background":"transparent"}},"action":"save"}
However it works if I dont apply the span tag in data->40->html
{"data":{"40":{"html":"test","background":"transparent"},"41":{"html":"","background":"transparent"},"42":{"html":"","background":"transparent"}},"action":"save"}
What is the problem here?
request.POST.get('d'))?