@mocanvas/mocanvas · function
declare function parseTldrawJsonFile({ json, schema }: {
json: string;
schema?: unknown;
}): ParseTldrawJsonFileResultParse .tldr JSON text without loading it into an editor.
The step before loadMocanvasFile for anything that wants to inspect a
file first — a document picker showing a thumbnail, a migration script, a
server validating an upload. schema is accepted so a caller can say which
schema the records should be read against; it is not consulted for a file
that carries its own, which every file written since the format gained an
envelope does.
Mentioned here
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.