mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-21 23:51:01 +08:00
Added istream/ostream funcs/operators
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <utility>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <ostream>
|
||||
|
||||
#if _MSC_VER >= 1400 // VC++ 8.0
|
||||
#pragma warning( disable : 4996 ) // disable warning about strdup being deprecated.
|
||||
@@ -475,5 +476,12 @@ StyledWriter::normalizeEOL( const std::string &text )
|
||||
return normalized;
|
||||
}
|
||||
|
||||
std::ostream& operator<<( std::ostream &sout, const Value &root )
|
||||
{
|
||||
Json::StyledWriter writer;
|
||||
sout << writer.write(root);
|
||||
return sout;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Json
|
||||
|
Reference in New Issue
Block a user