I extracted comments made in a website by converting the POST payload from the website to JSON and extracting the value in the comments field in Python.
The JSON looks something like this:
{
.
.
"comment": "The Quick Brown Fox Jumped Over The Lazy Dog"
.
.
}
When I print the comment using the print() function, this is how the comment is printed: The+Quick+Brown+Fox+Jumped+Over+The+Lazy+Dog
The type of the comment seems to be 'unicode'. I have tried everything mentioned here and here but those don't solve my problem.
I am using python 2.7. Right now I am printing it for debugging purposes but I want to store it in a database later. So I would need a permanent solution to convert unicode to string.
EDIT: I use var = json.loads(payload_from_POST) to convert the POST payload to JSON. Then I extract the value of "comment" by var['comment'].