dumps
Serialize data as JSON.
def dumps(
obj: Any,
**kwargs: Any
) - > string
Serialize data as JSON. If current_app is available, it will use its app.json.dumps() method, otherwise it will use json.dumps.
Parameters
| Name | Type | Description |
|---|---|---|
| obj | Any | The data object to serialize into a JSON string. |
| **kwargs | Any | Additional keyword arguments passed to the underlying JSON provider's dumps implementation. |
Returns
| Type | Description |
|---|---|
string | A JSON-formatted string representing the serialized object. |