How to save special characters (°, $, ¥, powers of a number) in JSON?
When parsing data (using python, scrapy), there are many specific characters that are not displayed in a human-like form.
For example, the temperature value is 1021 ° C, at the output I get
>>> response.xpath('path').extract() u'1021 \xb0C' >>> print(response.xpath('path').extract()) 1021 °C
And when forming a JSON object, I get
[{ ..."temp": "1021 \u00b0C", ... }]
Need
[{ ..."temp": "1021 °C", ... }]
How can I achieve a humanoid look in JSON? That characters were displayed as is.
\u
but then this json is not a fact that they will swallow the functions that should work with it - Mike\u
into the characters themselves - Mike\uxxxx
allow arbitrary json text to be sent using ASCII encoding, but of course, it is not necessary to use these sequences (except for certain exceptions). close to the topic . - jfs