How To Create Your First Web Application Using Flask and Python 3

Seeing how this view is supposed to be part of a backend API that sends and receives JSON, the response body must be JSON serializable. Ensure that it's ready for transmission by calling json.dumps on your dictionary, which will turn your Python object into valid JSON. This is used instead of jsonify, as jsonify constructs …

How To Create Your First Web Application Using Flask and Python 3 לקריאה »