The RTCSessionDescription.toJSON() method generates a JSON description of the object.
RTCSessionDescription.toJSON()
MDN Reference