jsonify
Serialize the given arguments as JSON, and return a :class:~flask.Response object with the application/json mimetype. A dict or list returned from a view will be converted to a JSON response automatically without needing to call this.
def jsonify(
*args: Any,
**kwargs: Any
) - > Response
Serialize the given arguments as JSON, and return a :class:~flask.Response object with the application/json mimetype. A dict or list returned from a view will be converted to a JSON response automatically without needing to call this.
Parameters
| Name | Type | Description |
|---|---|---|
| *args | Any | A single value to serialize, or multiple values to treat as a list to serialize. |
| **kwargs | Any | Key-value pairs to be treated as a dictionary for serialization. |
Returns
| Type | Description |
|---|---|
Response | A Flask Response object containing the serialized JSON data and the application/json mimetype. |