1
When a JSON returns through the methods make_response(jsonify())
, my browser can not understand the special characters, how to return JSON in UTF-8 encoding?
Follows the code:
@app.route('/', methods=['GET'])
def index():
return make_response(jsonify(address_info('Rua Parianas, 665 São Paulo').to_json()), 201)
Answer I would like to receive:
{
"city": "São Paulo",
"country": "Brazil",
"lat": -23.5100646,
"lng": -46.54488689999999,
"neighborhood": "Jardim Jaú (Zona Leste)",
"state": "SP",
"street_name": "Rua Parianas",
"street_number": "665"
}
Answer I’m getting:
{
"city": "S\u00e3o Paulo",
"country": "Brazil",
"lat": -23.5100646,
"lng": -46.54488689999999,
"neighborhood": "Jardim Ja\u00fa (Zona Leste)",
"state": "SP",
"street_name": "Rua Parianas",
"street_number": "665"
}