Skip to content
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

Ch4: remove jsonify from examples #19

Open
adrienbrunet opened this issue Apr 13, 2020 · 0 comments
Open

Ch4: remove jsonify from examples #19

adrienbrunet opened this issue Apr 13, 2020 · 0 comments

Comments

@adrienbrunet
Copy link

Hi There, this book is absolutely marvellous and I haven't read half of it yet. Thanks a ton!!

In Chapter 4 and maybe elsewhere, jsonify is used in the flask views to return the response.
Since flask 1.1, (see changelog), it is not mandatory.

Allow returning a dictionary from a view function. Similar to how returning a string will produce a text/html response, returning a dict will call jsonify to produce a application/json response. #3111

Since this book is not on flask itself, it may give an even simpler code example. If you think it makes the reader more aware of the nature of the response, I totally understand and this issue can be closed.

Thanks again ! All the best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant