Skip to main content

Function: stringify()

stringify(value, options?): string

Defined in: index.ts:40

Convert value to JSON string with full type support.

Handles cycles, aliases, Date, RegExp, Map, Set, Error, BigInt, TypedArrays. Web API objects (Request, Response, Headers, URL) are serialized with full fidelity.

This is a convenience wrapper around preprocess() + JSON.stringify().

Note: Async for Request/Response body reading.

Parameters

value

any

Any serializable value

options?

PreprocessOptions

Optional preprocessing options including custom transform hooks

Returns

string

JSON string in tuple $lmz format

Throws

TypeError if value contains symbols