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