I would like to globally set the charset of all JSONResponses in my web app to ‘utf-8’.
What is the recommended way to do that?
Is something like
JSONResponse.charset = 'utf-8'
right after the creation of an App instance OK?
A related question: Why is the class variable JSONResponse.charset set to None by default (line 228 in apistar/http.py) despite the fact that the render function is doing .encode(‘utf-8’) (line 239 in apistar/http.py)?
I’m refering to apistar version 0.5.40.