aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/rtcicecandidate/tojson/index.html
blob: 5b222fc286aba91ed4f7269290a1f3a13510617a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
title: RTCIceCandidate. toJSON()
slug: Web/API/RTCIceCandidate/toJSON
translation_of: Web/API/RTCIceCandidate/toJSON
---
<div>{{APIRef("WebRTC")}}</div>

<p><span class="seoSummary">{{domxref("RTCIceCandidate")}} 메소드인 <code><strong>toJSON()</strong></code>은 JSON 형식으로 호출된 RTCIceCandidate를 {{domxref("RTCIceCandidateInit")}} 객체 형식으로 변환합니다. .</span></p>

<h2 id="Syntax">Syntax</h2>

<pre class="syntaxbox"><em>json</em> = RTC<em>IceCandidate</em>.toJSON();</pre>

<h3 id="반환_값">반환 값</h3>

<p>{{domxref("RTCIceCandidateInit")}} 딕셔너리에 상응하는 객체로, <code>RTCIceCandidate</code> 객체의 해당하는 값으로 설정됩니다.</p>

<p>반환된 객체에 대한 문자열화된 버전의 객체는 {{jsxref("JSON.stringify", "stringify()")}}를 호출해서 가져올 수 있습니다. 아래의 {{anch("Example", "예시")}}를 참조하십시오.</p>

<h2 id="예시">예시</h2>

<p>아래의 샘플 코드는 <code>candidate</code> 변수의 <code>RTCIceCandidate</code>를 나타내는 JSON 문자열을 가져옵니다.</p>

<pre class="brush: js">var jsonString = candidate.toJSON().stringify();</pre>

<h2 id="명세">명세</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">명세</th>
   <th scope="col">상태</th>
   <th scope="col">코멘트</th>
  </tr>
  <tr>
   <td>{{SpecName('WebRTC 1.0', '#dom-rtcicecandidate-tojson', 'RTCIceCandidate.toJSON()')}}</td>
   <td>{{Spec2('WebRTC 1.0')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="브라우저_호환성">브라우저 호환성</h2>

<div>


<p>{{Compat("api.RTCIceCandidate.toJSON")}}</p>
</div>