dump
Serialize data as JSON and write to a file.
def dump(
obj: t.Any,
fp: t.IO[str],
kwargs: t.Any
) - > None
Serialize data as JSON and write to a file. If current_app is available, it will use its app.json.dump() method, otherwise it will use json.dump.
Parameters
| Name | Type | Description |
|---|---|---|
| obj | t.Any | The data to serialize. |
| fp | t.IO[str] | A file opened for writing text. Should use the UTF-8 encoding to be valid JSON. |
| kwargs | t.Any | Arguments passed to the dump implementation. |
Returns
| Type | Description |
|---|---|
None |