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
56def make_response(self, rv):
57 """
58 支持视图函数直接返回 DBModel, list, dict(1.1.0+官方支持)
59
60 e.g.::
61
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')
64
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)

Related snippets