color_tools.exporters.json_exporter

Generic JSON exporter for colors and filaments.

Exports palette data as structured JSON using the dataclass fields from ColorRecord and FilamentRecord.

The lightweight export_colors() path serializes a raw list of color records.

The palette-aware export_palette() path serializes both palette metadata and color records, providing a richer application/data interchange representation.

class color_tools.exporters.json_exporter.JSONExporter[source]

Bases: PaletteExporter

Export colors and filaments as generic JSON.

Records are serialized directly from their dataclass representation, preserving the available application-level fields without adapting them to a third-party palette specification.

Palette-aware export additionally preserves the complete PaletteMetadata dataclass.

property metadata: ExporterMetadata

Return metadata describing the generic JSON exporter.