Copy value into JSON-safe form.
value
Error
{name, message}
undefined
JSON.stringify
NaN
Infinity
null
Copy
valueinto JSON-safe form.Errorbecomes{name, message}(no stack: it names viewer internals and a controller cannot act on it).undefinedare dropped, asJSON.stringifywould.NaN/Infinitybecomenull, because that is what they decode as anyway and a silentnullis better than a frame that fails to parse.null.