-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: support
JSONRepsonse
dumps
callable return type bytes
the `dumps` parameter is used to serialize the `JSONResponse` to text. this is often done with python's built in `json.dumps` but other times via `orjson.dumps` however, to use `orjson.dumps`, you have to ignore the suggested type (`str`) because `orjson.dumps` returns a `bytes` to correct this, the typing for the dumps callable has been switched to be an `AnyStr` so either `bytes` or `str` returning callable can be passed
- Loading branch information
1 parent
da1c646
commit 6ba5dc7
Showing
2 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters