Skip to content

JSON exporter

Bases: AbstractExporter

__init__(stringify=True)

JSON exporter.

PARAMETER DESCRIPTION
stringify

whether to return a string or a dict. By default we return a string.

TYPE: bool DEFAULT: True

export(events)

Export events to JSON format.

PARAMETER DESCRIPTION
events

events to export.

TYPE: Iterable[Event]

RETURNS DESCRIPTION
list[dict[str, Any]] | str | None

str | None: JSON data.