1 // Copyright John W. Wilkinson 2007 - 2011
\r
2 // Distributed under the MIT License, see accompanying file LICENSE.txt
\r
4 // json spirit version 4.05
\r
6 #include "json_spirit_reader.h"
\r
7 #include "json_spirit_reader_template.h"
\r
9 using namespace json_spirit;
\r
11 #ifdef JSON_SPIRIT_VALUE_ENABLED
\r
12 bool json_spirit::read( const std::string& s, Value& value )
\r
14 return read_string( s, value );
\r
17 void json_spirit::read_or_throw( const std::string& s, Value& value )
\r
19 read_string_or_throw( s, value );
\r
22 bool json_spirit::read( std::istream& is, Value& value )
\r
24 return read_stream( is, value );
\r
27 void json_spirit::read_or_throw( std::istream& is, Value& value )
\r
29 read_stream_or_throw( is, value );
\r
32 bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
\r
34 return read_range( begin, end, value );
\r
37 void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
\r
39 begin = read_range_or_throw( begin, end, value );
\r
43 #if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
\r
44 bool json_spirit::read( const std::wstring& s, wValue& value )
\r
46 return read_string( s, value );
\r
49 void json_spirit::read_or_throw( const std::wstring& s, wValue& value )
\r
51 read_string_or_throw( s, value );
\r
54 bool json_spirit::read( std::wistream& is, wValue& value )
\r
56 return read_stream( is, value );
\r
59 void json_spirit::read_or_throw( std::wistream& is, wValue& value )
\r
61 read_stream_or_throw( is, value );
\r
64 bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
\r
66 return read_range( begin, end, value );
\r
69 void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
\r
71 begin = read_range_or_throw( begin, end, value );
\r
75 #ifdef JSON_SPIRIT_MVALUE_ENABLED
\r
76 bool json_spirit::read( const std::string& s, mValue& value )
\r
78 return read_string( s, value );
\r
81 void json_spirit::read_or_throw( const std::string& s, mValue& value )
\r
83 read_string_or_throw( s, value );
\r
86 bool json_spirit::read( std::istream& is, mValue& value )
\r
88 return read_stream( is, value );
\r
91 void json_spirit::read_or_throw( std::istream& is, mValue& value )
\r
93 read_stream_or_throw( is, value );
\r
96 bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
\r
98 return read_range( begin, end, value );
\r
101 void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
\r
103 begin = read_range_or_throw( begin, end, value );
\r
107 #if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
\r
108 bool json_spirit::read( const std::wstring& s, wmValue& value )
\r
110 return read_string( s, value );
\r
113 void json_spirit::read_or_throw( const std::wstring& s, wmValue& value )
\r
115 read_string_or_throw( s, value );
\r
118 bool json_spirit::read( std::wistream& is, wmValue& value )
\r
120 return read_stream( is, value );
\r
123 void json_spirit::read_or_throw( std::wistream& is, wmValue& value )
\r
125 read_stream_or_throw( is, value );
\r
128 bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
\r
130 return read_range( begin, end, value );
\r
133 void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
\r
135 begin = read_range_or_throw( begin, end, value );
\r