Function: parseImportData()
function parseImportData(text: string): ParseResult<FormSchemaExportData>;Defined in: shared/forms/form-schema-io.ts:64
Parse a serialized form-schema import payload. Accepts three shapes in preference order:
- New envelope:
{ name, schema, exportedAt }— the canonical output of buildExportData. - Legacy envelope:
{ name?, schema }— older exports without anexportedAtfield. SynthesisesexportedAt: "". - Bare content:
{ fields: [...] }— the schema object alone, with no envelope at all. Synthesisesname: ""andexportedAt: "".
Anything else returns a parse error.
Parameters
| Parameter | Type |
|---|---|
text | string |