Index: webrtc/stats/rtcstatsreport.cc |
diff --git a/webrtc/stats/rtcstatsreport.cc b/webrtc/stats/rtcstatsreport.cc |
index 566aef8772de09d18103123d8a9a17082e523bac..ca99cef2fa1225540a6948c811c25a5b7996b64c 100644 |
--- a/webrtc/stats/rtcstatsreport.cc |
+++ b/webrtc/stats/rtcstatsreport.cc |
@@ -103,14 +103,15 @@ RTCStatsReport::ConstIterator RTCStatsReport::end() const { |
stats_.cend()); |
} |
-std::string RTCStatsReport::ToString() const { |
+std::string RTCStatsReport::ToJson() const { |
std::ostringstream oss; |
ConstIterator it = begin(); |
if (it != end()) { |
- oss << it->ToString(); |
+ oss << '[' << it->ToJson(); |
for (++it; it != end(); ++it) { |
- oss << '\n' << it->ToString(); |
+ oss << ",\n" << it->ToJson(); |
} |
+ oss << ']'; |
hbos
2017/07/27 16:27:41
Again, is this parseable by json? Just an array th
hbos
2017/07/27 16:29:28
In any case, we could get rid of any spaces and ne
ehmaldonado_webrtc
2017/07/28 09:15:43
Yes, an array is parseable by JSON.
And done. Eras
|
} |
return oss.str(); |
} |