jsonSerializeSafe
Call Signature
Section titled “Call Signature”jsonSerializeSafe<
T>(value,replacer?,options?):JsonSerializeSafeResult<T>
Defined in: packages/core/src/json/json-serialize-safe.ts:24
Serialize a value to a JSON-compatible format.
The function follows the same rules as JSON.stringify, but instead of
returning a string, it returns the serialized value directly.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”T
The value to serialize.
replacer?
Section titled “replacer?”(string | number)[] | null
A function that transforms the result
options?
Section titled “options?”JsonMakeAllReplacersFunctionOptions
Options to customize the behavior of the serialization, such as handling circular references.
Returns
Section titled “Returns”JsonSerializeSafeResult<T>
A JSON representation of the value, or undefined if a “pure” value
has been passed in argument.
Call Signature
Section titled “Call Signature”jsonSerializeSafe<
T>(value,replacer?,options?):JsonifySafe<T> |undefined
Defined in: packages/core/src/json/json-serialize-safe.ts:29
Serialize a value to a JSON-compatible format.
The function follows the same rules as JSON.stringify, but instead of
returning a string, it returns the serialized value directly.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”T
The value to serialize.
replacer?
Section titled “replacer?”A function that transforms the result
options?
Section titled “options?”JsonMakeAllReplacersFunctionOptions
Options to customize the behavior of the serialization, such as handling circular references.
Returns
Section titled “Returns”JsonifySafe<T> | undefined
A JSON representation of the value, or undefined if a “pure” value
has been passed in argument.