How to make response decode dict in UTF-8?
from sanic import Sanic
from sanic.response import json as s_json
import json
app = Sanic("App Name")
d = {"aa": "тестовое наименование"}
@app.route("/")
async def test(request):
return s_json(d)
if __name__ == "__main__":
app.run(host="127.0.0.2", port=8000)
In web browser I am getting:
{"aa":"\u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435"}
I googled, but I did not found any answer.