1 // Copyright John W. Wilkinson 2007 - 2011
\r
2 // Distributed under the MIT License, see accompanying file LICENSE.txt
\r
4 // json spirit version 4.05
\r
6 #include "json_spirit_writer.h"
\r
7 #include "json_spirit_writer_template.h"
\r
9 using namespace json_spirit;
\r
11 #ifdef JSON_SPIRIT_VALUE_ENABLED
\r
12 void json_spirit::write( const Value& value, std::ostream& os, unsigned int options )
\r
14 write_stream( value, os, options );
\r
16 std::string json_spirit::write( const Value& value, unsigned int options )
\r
18 return write_string( value, options );
\r
21 void json_spirit::write_formatted( const Value& value, std::ostream& os )
\r
23 write_stream( value, os, pretty_print );
\r
26 std::string json_spirit::write_formatted( const Value& value )
\r
28 return write_string( value, pretty_print );
\r
32 #ifdef JSON_SPIRIT_MVALUE_ENABLED
\r
33 void json_spirit::write( const mValue& value, std::ostream& os, unsigned int options )
\r
35 write_stream( value, os, options );
\r
38 std::string json_spirit::write( const mValue& value, unsigned int options )
\r
40 return write_string( value, options );
\r
43 void json_spirit::write_formatted( const mValue& value, std::ostream& os )
\r
45 write_stream( value, os, pretty_print );
\r
48 std::string json_spirit::write_formatted( const mValue& value )
\r
50 return write_string( value, pretty_print );
\r
54 #if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
\r
55 void json_spirit::write( const wValue& value, std::wostream& os, unsigned int options )
\r
57 write_stream( value, os, options );
\r
60 std::wstring json_spirit::write( const wValue& value, unsigned int options )
\r
62 return write_string( value, options );
\r
65 void json_spirit::write_formatted( const wValue& value, std::wostream& os )
\r
67 write_stream( value, os, pretty_print );
\r
70 std::wstring json_spirit::write_formatted( const wValue& value )
\r
72 return write_string( value, pretty_print );
\r
76 #if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
\r
77 void json_spirit::write_formatted( const wmValue& value, std::wostream& os )
\r
79 write_stream( value, os, pretty_print );
\r
82 std::wstring json_spirit::write_formatted( const wmValue& value )
\r
84 return write_string( value, pretty_print );
\r
87 void json_spirit::write( const wmValue& value, std::wostream& os, unsigned int options )
\r
89 write_stream( value, os, options );
\r
92 std::wstring json_spirit::write( const wmValue& value, unsigned int options )
\r
94 return write_string( value, options );
\r