Flow123d  release_2.2.0-914-gf1a3a4f
json_spirit_writer.cpp
Go to the documentation of this file.
1 // Copyright John W. Wilkinson 2007 - 2011
2 // Distributed under the MIT License, see accompanying file LICENSE.txt
3 
4 // json spirit version 4.05
5 
6 #include "json_spirit_writer.h"
8 
9 using namespace json_spirit;
10 
11 #ifdef JSON_SPIRIT_VALUE_ENABLED
12  void json_spirit::write( const Value& value, std::ostream& os, unsigned int options )
13  {
14  write_stream( value, os, options );
15  }
16  std::string json_spirit::write( const Value& value, unsigned int options )
17  {
18  return write_string( value, options );
19  }
20 
21  void json_spirit::write_formatted( const Value& value, std::ostream& os )
22  {
23  write_stream( value, os, pretty_print );
24  }
25 
26  std::string json_spirit::write_formatted( const Value& value )
27  {
28  return write_string( value, pretty_print );
29  }
30 #endif
31 
32 #ifdef JSON_SPIRIT_MVALUE_ENABLED
33  void json_spirit::write( const mValue& value, std::ostream& os, unsigned int options )
34  {
35  write_stream( value, os, options );
36  }
37 
38  std::string json_spirit::write( const mValue& value, unsigned int options )
39  {
40  return write_string( value, options );
41  }
42 
43  void json_spirit::write_formatted( const mValue& value, std::ostream& os )
44  {
45  write_stream( value, os, pretty_print );
46  }
47 
49  {
50  return write_string( value, pretty_print );
51  }
52 #endif
53 
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 )
56  {
57  write_stream( value, os, options );
58  }
59 
60  std::wstring json_spirit::write( const wValue& value, unsigned int options )
61  {
62  return write_string( value, options );
63  }
64 
65  void json_spirit::write_formatted( const wValue& value, std::wostream& os )
66  {
68  }
69 
70  std::wstring json_spirit::write_formatted( const wValue& value )
71  {
72  return write_string( value, pretty_print );
73  }
74 #endif
75 
76 #if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
77  void json_spirit::write_formatted( const wmValue& value, std::wostream& os )
78  {
80  }
81 
82  std::wstring json_spirit::write_formatted( const wmValue& value )
83  {
84  return write_string( value, pretty_print );
85  }
86 
87  void json_spirit::write( const wmValue& value, std::wostream& os, unsigned int options )
88  {
89  write_stream( value, os, options );
90  }
91 
92  std::wstring json_spirit::write( const wmValue& value, unsigned int options )
93  {
94  return write_string( value, options );
95  }
96 #endif
Value_type::String_type write_string(const Value_type &value, unsigned int options=0)
void write(const mValue &value, std::ostream &os, unsigned int options=0)
static constexpr bool value
Definition: json.hpp:87
void write_stream(const Value_type &value, Ostream_type &os, unsigned int options=0)
void write_formatted(const mValue &value, std::ostream &os)