Serialize any value to a JSON string. Lenient codec: thin convenience over
JSON.stringify — functype instances self-stringify via their instance
toJSON() method (which emits the @functype-marked envelope), and
non-functype values pass through as plain JSON. Nested functype values
embedded in plain objects/arrays serialize correctly via the standard
JSON.stringify protocol with no walker needed.
undefined is converted to null (matching the convention DBOS and
SuperJSON use; JSON.stringify(undefined) returns the string "undefined"
which is not valid JSON).
Serialize any value to a JSON string. Lenient codec: thin convenience over
JSON.stringify— functype instances self-stringify via their instancetoJSON()method (which emits the@functype-marked envelope), and non-functype values pass through as plain JSON. Nested functype values embedded in plain objects/arrays serialize correctly via the standard JSON.stringify protocol with no walker needed.undefinedis converted tonull(matching the convention DBOS and SuperJSON use;JSON.stringify(undefined)returns the string"undefined"which is not valid JSON).