Answer the question
In order to leave comments, you need to log in
How can I replace unicode \u1111 with cyrillic human-readable characters in a json file?
There is a JSON file in which all Russian letters are replaced with /u[random numbers]. I found on the Internet that these are Unicode character designations. Question: how to automatically replace them with letters (definitely not manually, because there are 4747 lines)? It is necessary to read the written text.
Answer the question
In order to leave comments, you need to log in
1. Use the online decoder. For example, json.parser.online.fr
2. PHP code that converts codes to characters:
$text = json_encode(json_decode($text, false), JSON_UNESCAPED_UNICODE);
Python 3
import json
import requests
text_data = requests.get('https://...........................').content.decode('unicode-escape', 'ignore')
text_json = json.dumps(text_data)
text_json_load = json.loads(text_json)
print(text_json_load)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question