https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription/toJSON
PushSubscription: toJSON() method - Web APIs | MDN
The toJSON() method of the PushSubscription interface is a standard serializer: it returns a JSON representation of the subscription properties, providing a...
web apistojsonmethodmdn