tlc.core.export.exporters.default_json¶

Basic exporter for the JSON format.

Module Contents¶

Classes¶

Class

Description

DefaultJSONExporter

Basic exporter for the JSON format.

API¶

class DefaultJSONExporter¶

Bases: tlc.core.export.exporter.SerializingExporter

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.

classmethod can_export(
table: Table,
output_url: Url,
) bool¶
priority = 1¶
classmethod serialize(
table: Table,
output_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.

  • output_url – The output URL for the serialized data.

  • 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.

  • **kwargs – Additional keyword arguments.

Returns:

A JSON string representing the table

supported_format = json¶