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

file_extensions = frozenset(...)¶
priority = 1¶
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¶