toJSON

abstract fun toJSON(): String

Convert the URL to a JSON-compatible string; in practice, the return result is the same value as toString.

From MDN: "The toJSON() method of the URL interface returns a string containing a serialized version of the URL, although in practice it seems to have the same effect as URL.toString()."

Return

Absolute string URL.