1 // Copyright John W. Wilkinson 2007 - 2009.
\r
2 // Distributed under the MIT License, see accompanying file LICENSE.txt
\r
4 // json spirit version 4.03
\r
6 #include "json_spirit_reader.h"
\r
7 #include "json_spirit_reader_template.h"
\r
9 using namespace json_spirit;
\r
11 bool json_spirit::read( const std::string& s, Value& value )
\r
13 return read_string( s, value );
\r
16 void json_spirit::read_or_throw( const std::string& s, Value& value )
\r
18 read_string_or_throw( s, value );
\r
21 bool json_spirit::read( std::istream& is, Value& value )
\r
23 return read_stream( is, value );
\r
26 void json_spirit::read_or_throw( std::istream& is, Value& value )
\r
28 read_stream_or_throw( is, value );
\r
31 bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
\r
33 return read_range( begin, end, value );
\r
36 void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
\r
38 begin = read_range_or_throw( begin, end, value );
\r
41 #ifndef BOOST_NO_STD_WSTRING
\r
43 bool json_spirit::read( const std::wstring& s, wValue& value )
\r
45 return read_string( s, value );
\r
48 void json_spirit::read_or_throw( const std::wstring& s, wValue& value )
\r
50 read_string_or_throw( s, value );
\r
53 bool json_spirit::read( std::wistream& is, wValue& value )
\r
55 return read_stream( is, value );
\r
58 void json_spirit::read_or_throw( std::wistream& is, wValue& value )
\r
60 read_stream_or_throw( is, value );
\r
63 bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
\r
65 return read_range( begin, end, value );
\r
68 void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
\r
70 begin = read_range_or_throw( begin, end, value );
\r
75 bool json_spirit::read( const std::string& s, mValue& value )
\r
77 return read_string( s, value );
\r
80 void json_spirit::read_or_throw( const std::string& s, mValue& value )
\r
82 read_string_or_throw( s, value );
\r
85 bool json_spirit::read( std::istream& is, mValue& value )
\r
87 return read_stream( is, value );
\r
90 void json_spirit::read_or_throw( std::istream& is, mValue& value )
\r
92 read_stream_or_throw( is, value );
\r
95 bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
\r
97 return read_range( begin, end, value );
\r
100 void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
\r
102 begin = read_range_or_throw( begin, end, value );
\r
105 #ifndef BOOST_NO_STD_WSTRING
\r
107 bool json_spirit::read( const std::wstring& s, wmValue& value )
\r
109 return read_string( s, value );
\r
112 void json_spirit::read_or_throw( const std::wstring& s, wmValue& value )
\r
114 read_string_or_throw( s, value );
\r
117 bool json_spirit::read( std::wistream& is, wmValue& value )
\r
119 return read_stream( is, value );
\r
122 void json_spirit::read_or_throw( std::wistream& is, wmValue& value )
\r
124 read_stream_or_throw( is, value );
\r
127 bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
\r
129 return read_range( begin, end, value );
\r
132 void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
\r
134 begin = read_range_or_throw( begin, end, value );
\r