The toJSON() method of the TrustedScriptURL interface returns a JSON representation of the stored data.
toJSON()
MDN Reference