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