We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

RTCSessionDescription.toJSON()

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The RTCPeerConnection.toJSON() method generates a JSON description of the object. Both properties, type and sdp, are contained in the generated JSON.

Syntax

var jsonValue = sd.toJSON();

The result value is a JSON object containing the following values:

Example

// sd is a RTCSessionDescriptor

alert(JSON.stringify(sd)); // This call the toJSON() method behind the scene.

Specifications

Specification Status Comment
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCPeerConnection.toJSON()' in that specification.
Candidate Recommendation Initial specification.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes15 Yes -moz- No ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes Yes ? ? ? Yes

See also

Document Tags and Contributors

Contributors to this page: fscholz, abbycar, teoli
Last updated by: fscholz,