Skip to content

Commit 2227389

Browse files
author
constantined
committed
JSON Spirit updated to v4.06
1 parent c83d4d2 commit 2227389

14 files changed

+681
-382
lines changed

src/bitcoinrpc.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ using namespace boost;
3030
using namespace boost::asio;
3131
using namespace json_spirit;
3232

33+
static const char* Value_type_name[]={"obj", "array", "str", "bool", "int", "real", "null"};
34+
3335
static std::string strRPCUserColonPass;
3436

3537
// These are created by StartRPCThreads, destroyed in StopRPCThreads

src/json/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2007 - 2009 John W. Wilkinson
3+
Copyright (c) 2007 - 2010 John W. Wilkinson
44

55
Permission is hereby granted, free of charge, to any person
66
obtaining a copy of this software and associated documentation

src/json/json_spirit.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#ifndef JSON_SPIRIT
22
#define JSON_SPIRIT
33

4-
// Copyright John W. Wilkinson 2007 - 2009.
4+
// Copyright John W. Wilkinson 2007 - 2013
55
// Distributed under the MIT License, see accompanying file LICENSE.txt
66

7-
// json spirit version 4.03
7+
// json spirit version 4.06
88

99
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
1010
# pragma once

src/json/json_spirit_error_position.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#ifndef JSON_SPIRIT_ERROR_POSITION
22
#define JSON_SPIRIT_ERROR_POSITION
33

4-
// Copyright John W. Wilkinson 2007 - 2009.
4+
// Copyright John W. Wilkinson 2007 - 2013
55
// Distributed under the MIT License, see accompanying file LICENSE.txt
66

7-
// json spirit version 4.03
7+
// json spirit version 4.06
88

99
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
1010
# pragma once
@@ -48,7 +48,7 @@ namespace json_spirit
4848
return ( reason_ == lhs.reason_ ) &&
4949
( line_ == lhs.line_ ) &&
5050
( column_ == lhs.column_ );
51-
}
51+
}
5252
}
5353

5454
#endif

src/json/json_spirit_reader.cpp

Lines changed: 124 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,137 @@
1-
// Copyright John W. Wilkinson 2007 - 2009.
1+
// Copyright John W. Wilkinson 2007 - 2013
22
// Distributed under the MIT License, see accompanying file LICENSE.txt
33

4-
// json spirit version 4.03
4+
// json spirit version 4.06
55

66
#include "json_spirit_reader.h"
77
#include "json_spirit_reader_template.h"
88

99
using namespace json_spirit;
1010

11-
bool json_spirit::read( const std::string& s, Value& value )
12-
{
13-
return read_string( s, value );
14-
}
15-
16-
void json_spirit::read_or_throw( const std::string& s, Value& value )
17-
{
18-
read_string_or_throw( s, value );
19-
}
20-
21-
bool json_spirit::read( std::istream& is, Value& value )
22-
{
23-
return read_stream( is, value );
24-
}
25-
26-
void json_spirit::read_or_throw( std::istream& is, Value& value )
27-
{
28-
read_stream_or_throw( is, value );
29-
}
30-
31-
bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
32-
{
33-
return read_range( begin, end, value );
34-
}
35-
36-
void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
37-
{
38-
begin = read_range_or_throw( begin, end, value );
39-
}
40-
41-
#ifndef BOOST_NO_STD_WSTRING
42-
43-
bool json_spirit::read( const std::wstring& s, wValue& value )
44-
{
45-
return read_string( s, value );
46-
}
47-
48-
void json_spirit::read_or_throw( const std::wstring& s, wValue& value )
49-
{
50-
read_string_or_throw( s, value );
51-
}
52-
53-
bool json_spirit::read( std::wistream& is, wValue& value )
54-
{
55-
return read_stream( is, value );
56-
}
57-
58-
void json_spirit::read_or_throw( std::wistream& is, wValue& value )
59-
{
60-
read_stream_or_throw( is, value );
61-
}
62-
63-
bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
64-
{
65-
return read_range( begin, end, value );
66-
}
67-
68-
void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
69-
{
70-
begin = read_range_or_throw( begin, end, value );
71-
}
11+
#ifdef JSON_SPIRIT_VALUE_ENABLED
12+
bool json_spirit::read( const std::string& s, Value& value )
13+
{
14+
return read_string( s, value );
15+
}
16+
17+
void json_spirit::read_or_throw( const std::string& s, Value& value )
18+
{
19+
read_string_or_throw( s, value );
20+
}
21+
22+
bool json_spirit::read( std::istream& is, Value& value )
23+
{
24+
return read_stream( is, value );
25+
}
26+
27+
void json_spirit::read_or_throw( std::istream& is, Value& value )
28+
{
29+
read_stream_or_throw( is, value );
30+
}
31+
32+
bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
33+
{
34+
return read_range( begin, end, value );
35+
}
36+
37+
void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
38+
{
39+
begin = read_range_or_throw( begin, end, value );
40+
}
41+
#endif
7242

43+
#if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
44+
bool json_spirit::read( const std::wstring& s, wValue& value )
45+
{
46+
return read_string( s, value );
47+
}
48+
49+
void json_spirit::read_or_throw( const std::wstring& s, wValue& value )
50+
{
51+
read_string_or_throw( s, value );
52+
}
53+
54+
bool json_spirit::read( std::wistream& is, wValue& value )
55+
{
56+
return read_stream( is, value );
57+
}
58+
59+
void json_spirit::read_or_throw( std::wistream& is, wValue& value )
60+
{
61+
read_stream_or_throw( is, value );
62+
}
63+
64+
bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
65+
{
66+
return read_range( begin, end, value );
67+
}
68+
69+
void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
70+
{
71+
begin = read_range_or_throw( begin, end, value );
72+
}
7373
#endif
7474

75-
bool json_spirit::read( const std::string& s, mValue& value )
76-
{
77-
return read_string( s, value );
78-
}
79-
80-
void json_spirit::read_or_throw( const std::string& s, mValue& value )
81-
{
82-
read_string_or_throw( s, value );
83-
}
84-
85-
bool json_spirit::read( std::istream& is, mValue& value )
86-
{
87-
return read_stream( is, value );
88-
}
89-
90-
void json_spirit::read_or_throw( std::istream& is, mValue& value )
91-
{
92-
read_stream_or_throw( is, value );
93-
}
94-
95-
bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
96-
{
97-
return read_range( begin, end, value );
98-
}
99-
100-
void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
101-
{
102-
begin = read_range_or_throw( begin, end, value );
103-
}
104-
105-
#ifndef BOOST_NO_STD_WSTRING
106-
107-
bool json_spirit::read( const std::wstring& s, wmValue& value )
108-
{
109-
return read_string( s, value );
110-
}
111-
112-
void json_spirit::read_or_throw( const std::wstring& s, wmValue& value )
113-
{
114-
read_string_or_throw( s, value );
115-
}
116-
117-
bool json_spirit::read( std::wistream& is, wmValue& value )
118-
{
119-
return read_stream( is, value );
120-
}
121-
122-
void json_spirit::read_or_throw( std::wistream& is, wmValue& value )
123-
{
124-
read_stream_or_throw( is, value );
125-
}
126-
127-
bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
128-
{
129-
return read_range( begin, end, value );
130-
}
131-
132-
void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
133-
{
134-
begin = read_range_or_throw( begin, end, value );
135-
}
75+
#ifdef JSON_SPIRIT_MVALUE_ENABLED
76+
bool json_spirit::read( const std::string& s, mValue& value )
77+
{
78+
return read_string( s, value );
79+
}
80+
81+
void json_spirit::read_or_throw( const std::string& s, mValue& value )
82+
{
83+
read_string_or_throw( s, value );
84+
}
85+
86+
bool json_spirit::read( std::istream& is, mValue& value )
87+
{
88+
return read_stream( is, value );
89+
}
90+
91+
void json_spirit::read_or_throw( std::istream& is, mValue& value )
92+
{
93+
read_stream_or_throw( is, value );
94+
}
95+
96+
bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
97+
{
98+
return read_range( begin, end, value );
99+
}
100+
101+
void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
102+
{
103+
begin = read_range_or_throw( begin, end, value );
104+
}
105+
#endif
136106

107+
#if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
108+
bool json_spirit::read( const std::wstring& s, wmValue& value )
109+
{
110+
return read_string( s, value );
111+
}
112+
113+
void json_spirit::read_or_throw( const std::wstring& s, wmValue& value )
114+
{
115+
read_string_or_throw( s, value );
116+
}
117+
118+
bool json_spirit::read( std::wistream& is, wmValue& value )
119+
{
120+
return read_stream( is, value );
121+
}
122+
123+
void json_spirit::read_or_throw( std::wistream& is, wmValue& value )
124+
{
125+
read_stream_or_throw( is, value );
126+
}
127+
128+
bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
129+
{
130+
return read_range( begin, end, value );
131+
}
132+
133+
void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
134+
{
135+
begin = read_range_or_throw( begin, end, value );
136+
}
137137
#endif

src/json/json_spirit_reader.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#ifndef JSON_SPIRIT_READER
22
#define JSON_SPIRIT_READER
33

4-
// Copyright John W. Wilkinson 2007 - 2009.
4+
// Copyright John W. Wilkinson 2007 - 2013
55
// Distributed under the MIT License, see accompanying file LICENSE.txt
66

7-
// json spirit version 4.03
7+
// json spirit version 4.06
88

99
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
1010
# pragma once
@@ -18,44 +18,44 @@ namespace json_spirit
1818
{
1919
// functions to reads a JSON values
2020

21+
#ifdef JSON_SPIRIT_VALUE_ENABLED
2122
bool read( const std::string& s, Value& value );
2223
bool read( std::istream& is, Value& value );
2324
bool read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
2425

2526
void read_or_throw( const std::string& s, Value& value );
2627
void read_or_throw( std::istream& is, Value& value );
2728
void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
29+
#endif
2830

29-
#ifndef BOOST_NO_STD_WSTRING
30-
31+
#if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
3132
bool read( const std::wstring& s, wValue& value );
3233
bool read( std::wistream& is, wValue& value );
3334
bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
3435

3536
void read_or_throw( const std::wstring& s, wValue& value );
3637
void read_or_throw( std::wistream& is, wValue& value );
3738
void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );
38-
3939
#endif
4040

41+
#ifdef JSON_SPIRIT_MVALUE_ENABLED
4142
bool read( const std::string& s, mValue& value );
4243
bool read( std::istream& is, mValue& value );
4344
bool read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
4445

4546
void read_or_throw( const std::string& s, mValue& value );
4647
void read_or_throw( std::istream& is, mValue& value );
4748
void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
49+
#endif
4850

49-
#ifndef BOOST_NO_STD_WSTRING
50-
51+
#if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
5152
bool read( const std::wstring& s, wmValue& value );
5253
bool read( std::wistream& is, wmValue& value );
5354
bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
5455

5556
void read_or_throw( const std::wstring& s, wmValue& value );
5657
void read_or_throw( std::wistream& is, wmValue& value );
5758
void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );
58-
5959
#endif
6060
}
6161

0 commit comments

Comments
 (0)