OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 [NSJSONSerialization dataWithJSONObject:json | 42 [NSJSONSerialization dataWithJSONObject:json |
43 options:NSJSONWritingPrettyPrinted | 43 options:NSJSONWritingPrettyPrinted |
44 error:&error]; | 44 error:&error]; |
45 if (error) { | 45 if (error) { |
46 RTCLogError(@"Error serializing JSON: %@", error); | 46 RTCLogError(@"Error serializing JSON: %@", error); |
47 return nil; | 47 return nil; |
48 } | 48 } |
49 return data; | 49 return data; |
50 } | 50 } |
51 | 51 |
52 - (NSDictionary *)JSONDictionary{ | |
53 NSDictionary *json = @{ | |
54 kRTCICECandidateMLineIndexKey : @(self.sdpMLineIndex), | |
tkchin_webrtc
2016/05/17 02:01:43
the reason why I didn't like JSONDictionary is bec
honghaiz3
2016/05/17 06:11:24
Done. Passed in the type key as an argument.
| |
55 kRTCICECandidateMidKey : self.sdpMid, | |
56 kRTCICECandidateSdpKey : self.sdp | |
57 }; | |
58 return json; | |
59 } | |
60 | |
52 @end | 61 @end |
OLD | NEW |