View as Markdown

API reference: @salmonui/data/json

decodeTuplesfunction

import { decodeTuples } from '@salmonui/data/json';

Also exported from @salmonui/data.

function decodeTuples(rows: readonly WireTuple[], fields: readonly string[], expected: readonly string[] | null, dict: Readonly<Record<string, readonly string[]>> | undefined): unknown[][];

Brings response tuples into the client's field order and expands dictionary-encoded cells. Works in place on the freshly parsed arrays: when the server already used the requested order and no dictionary, this is a no-op (no per-row work at all). Returns the tuples.