Flow123d  master-f44eb46
json_spirit_writer.h
Go to the documentation of this file.
1 #ifndef JSON_SPIRIT_WRITER
2 #define JSON_SPIRIT_WRITER
3 
4 // Copyright John W. Wilkinson 2007 - 2011
5 // Distributed under the MIT License, see accompanying file LICENSE.txt
6 
7 // json spirit version 4.05
8 
9 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
10 # pragma once
11 #endif
12 
13 #include "json_spirit_value.h"
15 #include <iostream>
16 
17 namespace json_spirit
18 {
19  // these functions to convert JSON Values to text
20 
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 );
24 #endif
25 
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 );
29 #endif
30 
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 );
34 #endif
35 
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 );
39 #endif
40 
41  // these "formatted" versions of the "write" functions are the equivalent of the above functions
42  // with option "pretty_print"
43 
44 #ifdef JSON_SPIRIT_VALUE_ENABLED
45  void write_formatted( const Value& value, std::ostream& os );
46  std::string write_formatted( const Value& value );
47 #endif
48 #ifdef JSON_SPIRIT_MVALUE_ENABLED
49  void write_formatted( const mValue& value, std::ostream& os );
50  std::string write_formatted( const mValue& value );
51 #endif
52 
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 );
56 #endif
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 );
60 #endif
61 }
62 
63 #endif
@ Value
static constexpr bool value
Definition: json.hpp:87
void write_formatted(const mValue &value, std::ostream &os)
mConfig::Value_type mValue
void write(const mValue &value, std::ostream &os, unsigned int options=0)