For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server-editor/functions/serialize.md.

Function: serialize() experimental

serialize(obj): string

Beta

Parameters

obj

unknown

Returns

string

Remarks

Serialize anything, defaults to the same behavior as JSON.stringify but will use custom serializers passed into registerSerializationForType.