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.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: Table,
output_url: Url,
) bool
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

  • 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