How to use 'flask jsonify' in Python

Every line of 'flask jsonify' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
56def make_response(self, rv):
57 """
58 支持视图函数直接返回 DBModel, list, dict(1.1.0+官方支持)
60 e.g.::
62 # {job_number: 114, mobile: "13880000009", last_login: "2019-09-10 09:04:59", status: 1}
63 return TBUser.query.get(114).hide_keys('realname', 'role')
65 :param rv:
66 :return:
67 """
68 if isinstance(rv, (list, dict, DBModel)):
69 rv = jsonify(rv)
70 return super(Flask, self).make_response(rv=rv)

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

Related snippets