1 #ifndef JSON_SPIRIT_WRITER
\r
2 #define JSON_SPIRIT_WRITER
\r
4 // Copyright John W. Wilkinson 2007 - 2011
\r
5 // Distributed under the MIT License, see accompanying file LICENSE.txt
\r
7 // json spirit version 4.05
\r
9 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
\r
13 #include "json_spirit_value.h"
\r
14 #include "json_spirit_writer_options.h"
\r
17 namespace json_spirit
\r
19 // these functions to convert JSON Values to text
\r
21 #ifdef JSON_SPIRIT_VALUE_ENABLED
\r
22 void write( const Value& value, std::ostream& os, unsigned int options = 0 );
\r
23 std::string write( const Value& value, unsigned int options = 0 );
\r
26 #ifdef JSON_SPIRIT_MVALUE_ENABLED
\r
27 void write( const mValue& value, std::ostream& os, unsigned int options = 0 );
\r
28 std::string write( const mValue& value, unsigned int options = 0 );
\r
31 #if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
\r
32 void write( const wValue& value, std::wostream& os, unsigned int options = 0 );
\r
33 std::wstring write( const wValue& value, unsigned int options = 0 );
\r
36 #if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
\r
37 void write( const wmValue& value, std::wostream& os, unsigned int options = 0 );
\r
38 std::wstring write( const wmValue& value, unsigned int options = 0 );
\r
41 // these "formatted" versions of the "write" functions are the equivalent of the above functions
\r
42 // with option "pretty_print"
\r
44 #ifdef JSON_SPIRIT_VALUE_ENABLED
\r
45 void write_formatted( const Value& value, std::ostream& os );
\r
46 std::string write_formatted( const Value& value );
\r
48 #ifdef JSON_SPIRIT_MVALUE_ENABLED
\r
49 void write_formatted( const mValue& value, std::ostream& os );
\r
50 std::string write_formatted( const mValue& value );
\r
53 #if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
\r
54 void write_formatted( const wValue& value, std::wostream& os );
\r
55 std::wstring write_formatted( const wValue& value );
\r
57 #if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
\r
58 void write_formatted( const wmValue& value, std::wostream& os );
\r
59 std::wstring write_formatted( const wmValue& value );
\r