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.
JSON.stringify
The value to serialize.
Optional
A function that transforms the result
A JSON representation of the value, or undefined if a "pure" value has been passed in argument.
undefined
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.