Skip to content

jsonSerialize

jsonSerialize<T>(value, replacer?): JsonSerializeResult<T>

Defined in: packages/core/src/json/json-serialize.ts:16

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.

T

T

The value to serialize.

(string | number)[] | null

A function that transforms the result

JsonSerializeResult<T>

A JSON representation of the value, or undefined if a “pure” value has been passed in argument.

jsonSerialize<T>(value, replacer?): Jsonify<T> | undefined

Defined in: packages/core/src/json/json-serialize.ts:20

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.

T

T

The value to serialize.

JsonReplacer

A function that transforms the result

Jsonify<T> | undefined

A JSON representation of the value, or undefined if a “pure” value has been passed in argument.