RTCIceCandidate
메소드인 toJSON()
은 JSON 형식으로 호출된 RTCIceCandidate를 RTCIceCandidateInit
객체 형식으로 변환합니다. .
Syntax
json = RTCIceCandidate.toJSON();
반환 값
RTCIceCandidateInit
딕셔너리에 상응하는 객체로, RTCIceCandidate
객체의 해당하는 값으로 설정됩니다.
반환된 객체에 대한 문자열화된 버전의 객체는 stringify()
를 호출해서 가져올 수 있습니다. 아래의 예시를 참조하십시오.
예시
아래의 샘플 코드는 candidate
변수의 RTCIceCandidate
를 나타내는 JSON 문자열을 가져옵니다.
var jsonString = candidate.toJSON().stringify();
명세
명세 | 상태 | 코멘트 |
---|---|---|
WebRTC 1.0: Real-time Communication Between Browsers The definition of 'RTCIceCandidate.toJSON()' in that specification. |
Candidate Recommendation | Initial definition. |
브라우저 호환성
BCD tables only load in the browser
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.