Fabcoin Core  0.16.2
P2P Digital Currency
json_spirit_writer.cpp
Go to the documentation of this file.
1 // Copyright John W. Wilkinson 2007 - 2009.
2 // Distributed under the MIT License, see accompanying file LICENSE.txt
3 
4 // json spirit version 4.03
5 
6 #include "json_spirit_writer.h"
8 
9 void json_spirit::write( const Value& value, std::ostream& os )
10 {
11  write_stream( value, os, false );
12 }
13 
14 void json_spirit::write_formatted( const Value& value, std::ostream& os )
15 {
16  write_stream( value, os, true );
17 }
18 
19 std::string json_spirit::write( const Value& value )
20 {
21  return write_string( value, false );
22 }
23 
24 std::string json_spirit::write_formatted( const Value& value )
25 {
26  return write_string( value, true );
27 }
28 
29 #ifndef BOOST_NO_STD_WSTRING
30 
31 void json_spirit::write( const wValue& value, std::wostream& os )
32 {
33  write_stream( value, os, false );
34 }
35 
36 void json_spirit::write_formatted( const wValue& value, std::wostream& os )
37 {
38  write_stream( value, os, true );
39 }
40 
41 std::wstring json_spirit::write( const wValue& value )
42 {
43  return write_string( value, false );
44 }
45 
46 std::wstring json_spirit::write_formatted( const wValue& value )
47 {
48  return write_string( value, true );
49 }
50 
51 #endif
52 
53 void json_spirit::write( const mValue& value, std::ostream& os )
54 {
55  write_stream( value, os, false );
56 }
57 
58 void json_spirit::write_formatted( const mValue& value, std::ostream& os )
59 {
60  write_stream( value, os, true );
61 }
62 
63 std::string json_spirit::write( const mValue& value )
64 {
65  return write_string( value, false );
66 }
67 
68 std::string json_spirit::write_formatted( const mValue& value )
69 {
70  return write_string( value, true );
71 }
72 
73 #ifndef BOOST_NO_STD_WSTRING
74 
75 void json_spirit::write( const wmValue& value, std::wostream& os )
76 {
77  write_stream( value, os, false );
78 }
79 
80 void json_spirit::write_formatted( const wmValue& value, std::wostream& os )
81 {
82  write_stream( value, os, true );
83 }
84 
85 std::wstring json_spirit::write( const wmValue& value )
86 {
87  return write_string( value, false );
88 }
89 
90 std::wstring json_spirit::write_formatted( const wmValue& value )
91 {
92  return write_string( value, true );
93 }
94 
95 #endif
void write_formatted(const Value &value, std::ostream &os)
void write_stream(const Value_type &value, Ostream_type &os, bool pretty)
void write(const Value &value, std::ostream &os)
Value_type::String_type write_string(const Value_type &value, bool pretty)