Index: base/values.cc |
diff --git a/base/values.cc b/base/values.cc |
index c9b5eef3da7052d8b05e086656bcc539026f91c4..346f039139096fce786c0e32ac8f46880eb031bb 100644 |
--- a/base/values.cc |
+++ b/base/values.cc |
@@ -5,8 +5,10 @@ |
#include "base/values.h" |
#include <algorithm> |
+#include <ostream> |
#include "base/float_util.h" |
+#include "base/json/json_writer.h" |
#include "base/logging.h" |
#include "base/string_util.h" |
#include "base/utf_string_conversions.h" |
@@ -1057,4 +1059,12 @@ bool ListValue::Equals(const Value* other) const { |
ValueSerializer::~ValueSerializer() { |
} |
+std::ostream& operator<<(std::ostream& out, const Value& value) { |
+ std::string json; |
+ base::JSONWriter::WriteWithOptions(&value, |
willchan no longer on Chromium
2012/09/12 01:20:13
is the base:: here necessary? We're in the base na
not at google - send to devlin
2012/09/12 01:21:48
Done.
|
+ JSONWriter::OPTIONS_PRETTY_PRINT, |
+ &json); |
+ return out << json; |
+} |
+ |
} // namespace base |