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