It appears that this works:
@app.route('/my/route/')
def my_route():
return {
'Something': True,
'Else': None,
'Thingy': 12345,
'Blah': 'Blah'
}
When I visit the route in a browser, I get valid JSON like this:
{
"Something": true,
"Else": null,
"Thingy": 12345
"Blah": "Blah",
}
Everything is converted to valid JSON, but I haven't seen any documentation supporting this. I'm not even importing the jsonify module. Is this ok?