summaryrefslogtreecommitdiffstats
path: root/src/json_spirit/json_spirit_reader.cpp
blob: 268aceac4bd172a021c7f8e4800c2dc1fdc87e15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
//          Copyright John W. Wilkinson 2007 - 2011
// Distributed under the MIT License, see accompanying file LICENSE.txt

// json spirit version 4.05

#include "json_spirit_reader.h"
#include "json_spirit_reader_template.h"

using namespace json_spirit;

#ifdef JSON_SPIRIT_VALUE_ENABLED
    bool json_spirit::read( const std::string& s, Value& value )
    {
        return read_string( s, value );
    }
    
    void json_spirit::read_or_throw( const std::string& s, Value& value )
    {
        read_string_or_throw( s, value );
    }

    bool json_spirit::read( std::istream& is, Value& value )
    {
        return read_stream( is, value );
    }

    void json_spirit::read_or_throw( std::istream& is, Value& value )
    {
        read_stream_or_throw( is, value );
    }

    bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
    {
        return read_range( begin, end, value );
    }

    void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
    {
        begin = read_range_or_throw( begin, end, value );
    }
#endif

#if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
    bool json_spirit::read( const std::wstring& s, wValue& value )
    {
        return read_string( s, value );
    }

    void json_spirit::read_or_throw( const std::wstring& s, wValue& value )
    {
        read_string_or_throw( s, value );
    }

    bool json_spirit::read( std::wistream& is, wValue& value )
    {
        return read_stream( is, value );
    }

    void json_spirit::read_or_throw( std::wistream& is, wValue& value )
    {
        read_stream_or_throw( is, value );
    }

    bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
    {
        return read_range( begin, end, value );
    }

    void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
    {
        begin = read_range_or_throw( begin, end, value );
    }
#endif

#ifdef JSON_SPIRIT_MVALUE_ENABLED
    bool json_spirit::read( const std::string& s, mValue& value )
    {
        return read_string( s, value );
    }

    void json_spirit::read_or_throw( const std::string& s, mValue& value )
    {
        read_string_or_throw( s, value );
    }
    
    bool json_spirit::read( std::istream& is, mValue& value )
    {
        return read_stream( is, value );
    }

    void json_spirit::read_or_throw( std::istream& is, mValue& value )
    {
        read_stream_or_throw( is, value );
    }

    bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
    {
        return read_range( begin, end, value );
    }

    void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
    {
        begin = read_range_or_throw( begin, end, value );
    }
#endif

#if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
    bool json_spirit::read( const std::wstring& s, wmValue& value )
    {
        return read_string( s, value );
    }

    void json_spirit::read_or_throw( const std::wstring& s, wmValue& value )
    {
        read_string_or_throw( s, value );
    }

    bool json_spirit::read( std::wistream& is, wmValue& value )
    {
        return read_stream( is, value );
    }

    void json_spirit::read_or_throw( std::wistream& is, wmValue& value )
    {
        read_stream_or_throw( is, value );
    }

    bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
    {
        return read_range( begin, end, value );
    }

    void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
    {
        begin = read_range_or_throw( begin, end, value );
    }
#endif