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
Fixed json.jsonify #790
Fixed json.jsonify #790
Conversation
But that would break all existing code that currently uses jsonify! |
Add it as a new function, mark the old function as depreciated.
|
You're right, sorry! 2013/7/4 Markus Unterwaditzer notifications@github.com
|
devilicecream, i honestly don't know. I never had the need for custom json encoders. I always convert my data to native types before passing to jsonify, mostly because the explicitness gives me some sense of security. I can see why people would want to use it though. |
Maybe split the current jsonify into one func that takes stdlib-like args, and a second one that wraps the first one? |
I like this solution. I'm doing it :) thank u! 2013/7/4 Markus Unterwaditzer notifications@github.com
|
…er for the new implementation. Added test functions for json_encode and json security
Done as a wrapper, but i'm not really sure about this implementation. Maybe it will be better if i made both functions indipendent from the other. Waiting for suggests |
You can already use a custom encoder by subclassing Flask and overriding the |
Modified jsonify to allow passing the same parameters of json.dumps (expecially to support custom encoders). Test suite updated to support the update.