<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -217,3 +217,16 @@ bool Array::parse(std::istream&amp; input) {
 }
 
 }  // namespace jsonxx
+
+std::ostream&amp; operator&lt;&lt;(std::ostream&amp; stream, const jsonxx::Value&amp; v) {
+  if (v.is&lt;long&gt;()) {
+    return stream &lt;&lt; v.get&lt;long&gt;();
+  } else if (v.is&lt;std::string&gt;()) {
+    return stream &lt;&lt; '&quot;'  &lt;&lt; v.get&lt;std::string&gt;() &lt;&lt; '&quot;';
+  } else if (v.is&lt;bool&gt;()) {
+    return stream &lt;&lt; v.get&lt;bool&gt;();
+  } else if (v.is&lt;jsonxx::Value::Null&gt;()) {
+    return stream &lt;&lt; &quot;null&quot;;
+  }
+  return stream;
+}</diff>
      <filename>jsonxx.cc</filename>
    </modified>
    <modified>
      <diff>@@ -212,3 +212,6 @@ inline const Object&amp; Value::get&lt;Object&gt;() const {
 }
 
 }  // namespace jsonxx
+
+std::ostream&amp; operator&lt;&lt;(std::ostream&amp; stream, const jsonxx::Value&amp; v);
+</diff>
      <filename>jsonxx.h</filename>
    </modified>
    <modified>
      <diff>@@ -110,6 +110,9 @@ int main() {
         assert(v.parse(input));
         assert(v.is&lt;std::string&gt;());
         assert(&quot;field1&quot; == v.get&lt;std::string&gt;());
+        ostringstream stream;
+        stream &lt;&lt; v;
+        assert(stream.str() == &quot;\&quot;field1\&quot;&quot;);
     }
     {
         string teststr(&quot;[\&quot;field1\&quot;, 6]&quot;);</diff>
      <filename>jsonxx_test.cc</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f322121d9f831ac7f1bf7bf4052bead92dc63c6a</id>
    </parent>
  </parents>
  <author>
    <name>Hong Jiang</name>
    <email>hong@hjiang.net</email>
  </author>
  <url>http://github.com/hjiang/jsonxx/commit/cf62849cba56ba05eb40df28bc746cd0283f7e64</url>
  <id>cf62849cba56ba05eb40df28bc746cd0283f7e64</id>
  <committed-date>2009-09-06T02:30:50-07:00</committed-date>
  <authored-date>2009-09-06T02:30:50-07:00</authored-date>
  <message>added operator&lt;&lt; for values of primitive types</message>
  <tree>62f87669514d384c1b21960322baf4eb60020b2c</tree>
  <committer>
    <name>Hong Jiang</name>
    <email>hong@hjiang.net</email>
  </committer>
</commit>
