/** * The built-in **JSON exporter**. * * JSON needs no library, so — unlike Excel and PDF — it is implemented directly * in the core and is always available, with no registration step. * * It emits an array of objects, one per exported row, keyed by each column's * `field` (or its header, with {@link JsonExportOptions.useHeadersAsKeys}). * Values are the grid's **logical** values, not its display strings: a number * stays `1200`, a boolean stays `true`, and a missing value is `null` rather * than absent — so a round-trip through `JSON.parse` gives back data, not text. * Hosts that want the on-screen strings ask for * {@link JsonExportOptions.useFormattedValues}. * * @packageDocumentation */ import type { GridExporter, JsonExportOptions, PreparedExportData } from './export.types'; /** A single exported row as a plain object. */ export type JsonExportRecord = Record; /** * Projects prepared data into plain records, ready for `JSON.stringify`. * * Duplicate keys (two columns sharing a `field`, or two identical headers under * `useHeadersAsKeys`) are disambiguated with a numeric suffix rather than * silently overwriting each other — a column that vanished from the output * would be the harder bug to notice. * * @param data - The normalised export payload. * @param options - JSON options; `useHeadersAsKeys` and `useFormattedValues` are read. */ export declare function toJsonRecords(data: PreparedExportData, options?: JsonExportOptions): JsonExportRecord[]; /** * Serialises prepared data as a JSON document. * * `Date` values are serialised by `JSON.stringify` to ISO-8601 strings, which * is the only interchange form JSON has for them. * * @param data - The normalised export payload. * @param options - JSON options; `pretty` and `indent` control the layout. */ export declare function serializeJson(data: PreparedExportData, options?: JsonExportOptions): string; /** * The core's JSON exporter. Registered automatically by every grid — JSON never * reports itself as unavailable. */ export declare const jsonExporter: GridExporter; //# sourceMappingURL=json-exporter.d.ts.map