dumps
Serialize data as JSON.
def dumps(
obj: t.Any,
kwargs: t.Any
) - > str
Serialize data as JSON. If :data:~flask.current_app is available, it will use its :meth:app.json.dumps() < flask.json.provider.JSONProvider.dumps > method, otherwise it will use :func:json.dumps.
Parameters
| Name | Type | Description |
|---|---|---|
| obj | t.Any | The data to serialize into a JSON string. |
| kwargs | t.Any | Additional keyword arguments passed to the underlying JSON serialization implementation (either current_app.json.dumps() or json.dumps). |
Returns
| Type | Description |
|---|---|
str | The JSON serialized string representation of the object. |