I pulling in some JSON data that has something like this:
{
"string":"• Christmas 2014 •",
"layer_id":490,
"other": "attributes",
"that_dont": "matter"
}
This JSON is being generated elsewhere and I'm pulling it in via an http request (using json.loads(request.text)).
When I print the string in my console, I get:
⢠Christmas 2014
(and an exceptions.UnicodeDecodeError error if I try to str())
I'm printing the string on a PDF and need the string to literally be:
"\u00B7 Christmas 2014 \u00B7"
My instincts are a bit hacky and I just want to replace the series of strange characters with the proper unicode point, but I don't even know what it is that I'm looking to replace.
• Christmas 2014 •.