-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add API to easily send JSON as web response body #1732
Comments
it is about convenience. Of course for proper handling of json encoding with versioning and custom serialization proper middle should be used. |
Why is this better than |
it is not better it is convenient. |
It's like moving in backward direction. Honestly I have a feeling than the class is overcomplicated (take a look in Adding a new parameter leads to combinatorial explosion. |
I am ok with this. we can close this ticket |
I agree with @asvetlov on aiohttp needing 2 response classes and having the json response part of TextResponse. I would do it myself but I am not sure what parts are for binary data and what parts are for text data or both. That is how complicated it is. However there might be places where binary data is sent with json data. In that case it might break unless there is a way to avoid it? |
we may need to reconsider adding "json=" parameter to web.Response class.
more discussions in #1726 and #592
The text was updated successfully, but these errors were encountered: