You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be kinda cool if we could pretty-print returned json (by setting the "indent" parameter on json.dumpshere). I really like being able to explore APIs that do this - especially from the command line.
One simple method would be to add a settings variable to the flask_restful.representations.json module that you can directly set, e.g. like this:
Hm, that's not a bad idea either. I wouldn't mind having a method of manually setting it, though, even in non-debug mode, though. I know that Stripe, for example, will serve pretty-printed JSON to everybody. For example: curl -ik https://api.stripe.com/v1/ gives properly pretty-printed JSON.
Hey there,
It would be kinda cool if we could pretty-print returned json (by setting the "indent" parameter on json.dumps here). I really like being able to explore APIs that do this - especially from the command line.
One simple method would be to add a settings variable to the
flask_restful.representations.json
module that you can directly set, e.g. like this:If this sounds like something that would be allowed, I'd be happy to send a pull request.
Thanks.
The text was updated successfully, but these errors were encountered: