-
-
Notifications
You must be signed in to change notification settings - Fork 16.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
padded attribute on jsonify not functioning as expected #495
Comments
I added a quick fix for this issue at https://github.com/BeStillAsBright/flask/tree/issue495 but I must admit I'm new to contributing on github so I don't exactly know the proper procedures for this kind of thing. |
@BeStillAsBright the preferred method for contributing is using GitHub pull requests: http://help.github.com/send-pull-requests/ The fix in b5fc0c3266a45f8b25260360518b2eac2d4eef34 does not handle the case where padded is a string argument. Reviewing this further, I'd like to confirm on the Flask team that the padded API for the jsonify function is what we want. In the current implementation, padded can be a boolean or a string, and that string points to the URL query argument which supplies the function name. This is a feature added in 0.9-dev, and is not yet fully released. I added a test to make sure we fix this issue before release. If we change the jsonify padded behavior, I'll send an announcement to the mailing list. |
JSONP removed from Flask core in favor of an extension. See #502. |
When calling jsonify with the padded argument as True the expected behavior is padded JSON response that uses the callback argument. Example
However when setting padded to False the result is still a padded JSON response with the name of the callback function set to jsonp. Example
Should be
The text was updated successfully, but these errors were encountered: