An object that may define a toJSON() method, which jsonStringify detaches before serializing to avoid faulty overrides on some websites.
toJSON()
jsonStringify
Optional
Custom JSON serialization hook, as used by JSON.stringify.
JSON.stringify
An object that may define a
toJSON()method, whichjsonStringifydetaches before serializing to avoid faulty overrides on some websites.