JSON Spirit library from http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx,...
[novacoin.git] / json / json_spirit_reader.cpp
1 //          Copyright John W. Wilkinson 2007 - 2009.\r
2 // Distributed under the MIT License, see accompanying file LICENSE.txt\r
3 \r
4 // json spirit version 4.03\r
5 \r
6 #include "json_spirit_reader.h"\r
7 #include "json_spirit_reader_template.h"\r
8 \r
9 using namespace json_spirit;\r
10 \r
11 bool json_spirit::read( const std::string& s, Value& value )\r
12 {\r
13     return read_string( s, value );\r
14 }\r
15 \r
16 void json_spirit::read_or_throw( const std::string& s, Value& value )\r
17 {\r
18     read_string_or_throw( s, value );\r
19 }\r
20 \r
21 bool json_spirit::read( std::istream& is, Value& value )\r
22 {\r
23     return read_stream( is, value );\r
24 }\r
25 \r
26 void json_spirit::read_or_throw( std::istream& is, Value& value )\r
27 {\r
28     read_stream_or_throw( is, value );\r
29 }\r
30 \r
31 bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )\r
32 {\r
33     return read_range( begin, end, value );\r
34 }\r
35 \r
36 void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )\r
37 {\r
38     begin = read_range_or_throw( begin, end, value );\r
39 }\r
40 \r
41 #ifndef BOOST_NO_STD_WSTRING\r
42 \r
43 bool json_spirit::read( const std::wstring& s, wValue& value )\r
44 {\r
45     return read_string( s, value );\r
46 }\r
47 \r
48 void json_spirit::read_or_throw( const std::wstring& s, wValue& value )\r
49 {\r
50     read_string_or_throw( s, value );\r
51 }\r
52 \r
53 bool json_spirit::read( std::wistream& is, wValue& value )\r
54 {\r
55     return read_stream( is, value );\r
56 }\r
57 \r
58 void json_spirit::read_or_throw( std::wistream& is, wValue& value )\r
59 {\r
60     read_stream_or_throw( is, value );\r
61 }\r
62 \r
63 bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )\r
64 {\r
65     return read_range( begin, end, value );\r
66 }\r
67 \r
68 void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )\r
69 {\r
70     begin = read_range_or_throw( begin, end, value );\r
71 }\r
72 \r
73 #endif\r
74 \r
75 bool json_spirit::read( const std::string& s, mValue& value )\r
76 {\r
77     return read_string( s, value );\r
78 }\r
79 \r
80 void json_spirit::read_or_throw( const std::string& s, mValue& value )\r
81 {\r
82     read_string_or_throw( s, value );\r
83 }\r
84 \r
85 bool json_spirit::read( std::istream& is, mValue& value )\r
86 {\r
87     return read_stream( is, value );\r
88 }\r
89 \r
90 void json_spirit::read_or_throw( std::istream& is, mValue& value )\r
91 {\r
92     read_stream_or_throw( is, value );\r
93 }\r
94 \r
95 bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )\r
96 {\r
97     return read_range( begin, end, value );\r
98 }\r
99 \r
100 void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )\r
101 {\r
102     begin = read_range_or_throw( begin, end, value );\r
103 }\r
104 \r
105 #ifndef BOOST_NO_STD_WSTRING\r
106 \r
107 bool json_spirit::read( const std::wstring& s, wmValue& value )\r
108 {\r
109     return read_string( s, value );\r
110 }\r
111 \r
112 void json_spirit::read_or_throw( const std::wstring& s, wmValue& value )\r
113 {\r
114     read_string_or_throw( s, value );\r
115 }\r
116 \r
117 bool json_spirit::read( std::wistream& is, wmValue& value )\r
118 {\r
119     return read_stream( is, value );\r
120 }\r
121 \r
122 void json_spirit::read_or_throw( std::wistream& is, wmValue& value )\r
123 {\r
124     read_stream_or_throw( is, value );\r
125 }\r
126 \r
127 bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )\r
128 {\r
129     return read_range( begin, end, value );\r
130 }\r
131 \r
132 void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )\r
133 {\r
134     begin = read_range_or_throw( begin, end, value );\r
135 }\r
136 \r
137 #endif\r