Projects : bitcoin : bitcoin_dumpblock_no_losers

bitcoin/src/json/json_spirit_writer.cpp

Dir - Raw

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"
7#include "json_spirit_writer_template.h"
8
9void json_spirit::write( const Value& value, std::ostream& os )
10{
11 write_stream( value, os, false );
12}
13
14void json_spirit::write_formatted( const Value& value, std::ostream& os )
15{
16 write_stream( value, os, true );
17}
18
19std::string json_spirit::write( const Value& value )
20{
21 return write_string( value, false );
22}
23
24std::string json_spirit::write_formatted( const Value& value )
25{
26 return write_string( value, true );
27}
28
29#ifndef BOOST_NO_STD_WSTRING
30
31void json_spirit::write( const wValue& value, std::wostream& os )
32{
33 write_stream( value, os, false );
34}
35
36void json_spirit::write_formatted( const wValue& value, std::wostream& os )
37{
38 write_stream( value, os, true );
39}
40
41std::wstring json_spirit::write( const wValue& value )
42{
43 return write_string( value, false );
44}
45
46std::wstring json_spirit::write_formatted( const wValue& value )
47{
48 return write_string( value, true );
49}
50
51#endif
52
53void json_spirit::write( const mValue& value, std::ostream& os )
54{
55 write_stream( value, os, false );
56}
57
58void json_spirit::write_formatted( const mValue& value, std::ostream& os )
59{
60 write_stream( value, os, true );
61}
62
63std::string json_spirit::write( const mValue& value )
64{
65 return write_string( value, false );
66}
67
68std::string json_spirit::write_formatted( const mValue& value )
69{
70 return write_string( value, true );
71}
72
73#ifndef BOOST_NO_STD_WSTRING
74
75void json_spirit::write( const wmValue& value, std::wostream& os )
76{
77 write_stream( value, os, false );
78}
79
80void json_spirit::write_formatted( const wmValue& value, std::wostream& os )
81{
82 write_stream( value, os, true );
83}
84
85std::wstring json_spirit::write( const wmValue& value )
86{
87 return write_string( value, false );
88}
89
90std::wstring json_spirit::write_formatted( const wmValue& value )
91{
92 return write_string( value, true );
93}
94
95#endif