aboutsummaryrefslogtreecommitdiff
path: root/json/json_spirit_reader.h
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-02-10 19:41:22 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-02-10 19:41:22 +0000
commit40d324f102295b8eea70ec9ac6b42be417cbbfb8 (patch)
tree449039c92ef7b69afb7f6864032748d444c368a1 /json/json_spirit_reader.h
parent1c5d5e58c67e63fd83afd945c7db1190de62514a (diff)
downloadbitcoin-40d324f102295b8eea70ec9ac6b42be417cbbfb8.tar.xz
JSON Spirit library from http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx, MIT license
Diffstat (limited to 'json/json_spirit_reader.h')
-rw-r--r--json/json_spirit_reader.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/json/json_spirit_reader.h b/json/json_spirit_reader.h
new file mode 100644
index 0000000000..a58bfc10fe
--- /dev/null
+++ b/json/json_spirit_reader.h
@@ -0,0 +1,62 @@
+#ifndef JSON_SPIRIT_READER
+#define JSON_SPIRIT_READER
+
+// Copyright John W. Wilkinson 2007 - 2009.
+// Distributed under the MIT License, see accompanying file LICENSE.txt
+
+// json spirit version 4.03
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include "json_spirit_value.h"
+#include "json_spirit_error_position.h"
+#include <iostream>
+
+namespace json_spirit
+{
+ // functions to reads a JSON values
+
+ bool read( const std::string& s, Value& value );
+ bool read( std::istream& is, Value& value );
+ bool read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
+
+ void read_or_throw( const std::string& s, Value& value );
+ void read_or_throw( std::istream& is, Value& value );
+ void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
+
+#ifndef BOOST_NO_STD_WSTRING
+
+ bool read( const std::wstring& s, wValue& value );
+ bool read( std::wistream& is, wValue& value );
+ bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
+
+ void read_or_throw( const std::wstring& s, wValue& value );
+ void read_or_throw( std::wistream& is, wValue& value );
+ void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
+
+#endif
+
+ bool read( const std::string& s, mValue& value );
+ bool read( std::istream& is, mValue& value );
+ bool read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
+
+ void read_or_throw( const std::string& s, mValue& value );
+ void read_or_throw( std::istream& is, mValue& value );
+ void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
+
+#ifndef BOOST_NO_STD_WSTRING
+
+ bool read( const std::wstring& s, wmValue& value );
+ bool read( std::wistream& is, wmValue& value );
+ bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
+
+ void read_or_throw( const std::wstring& s, wmValue& value );
+ void read_or_throw( std::wistream& is, wmValue& value );
+ void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
+
+#endif
+}
+
+#endif