tlc.core.export.exporters.default_json
#
Basic exporter for the JSON format.
Module Contents#
Classes#
Class |
Description |
---|---|
Basic exporter for the JSON format. |
API#
- class tlc.core.export.exporters.default_json.DefaultJSONExporter#
Bases:
tlc.core.export.exporter.Exporter
Basic exporter for the JSON format.
This exporter is used when no other exporter is compatible with the Table, and the output path has a .json extension.
- supported_format = json#
- priority = 1#
- classmethod can_export(table: tlc.core.objects.table.Table, output_url: tlc.core.url.Url) bool #
- classmethod serialize(table: tlc.core.objects.table.Table, output_url: tlc.core.url.Url, weight_threshold: float = 0.0, indent: int = 4, **kwargs: Any) str #
Serialize a table to a JSON string.
- Parameters:
table – The table to serialize
weight_threshold – The minimum weight of a row to be included in the output
indent – The number of spaces to use for indentation in the output
- Returns:
A JSON string representing the table